How TransformApplier uses minimal set of transformation coefficients

Affiliation
American Association of Variable Star Observers (AAVSO)
Mon, 10/01/2018 - 13:55

Dear Colleagues,

Could anyone tell me how exactly TransformApplier makes the transformation in AAVSO mode for, say, V and B magnitudes? It seems that it uses only two transformation coefficients, namely Tv_bv and Tb_bv and ignores Tbv coefficient (CCD Photometry Guide V1.1, part 6 mentions that “To reduce error and improve your results, you will want to use just two coefficients — in this case just T b_bv and T v_bv — for a two-filter system. Unfortunately, the algebra gets very messy very quickly. That is why we recommend using a tool like TransformApplier (http://www.aavso.org/transformapplier) to help you with this process.”  -- page 61).

To make the transformation, we need Delta(B-V) difference between target and comp star; (B-V) for comp we know from a catalog, however (B-V) for the target is unknown a priori.

I could guess that Transform Applier uses some iterative algorithm (taking at step 0 observed untransformed b-v of the target: I tried to transform a couple of examples using such an iterative method: it gives almost the same results as TA (difference ~0.001 mag or less).

Is it true or TA calculates transformation another way?

(I’m asking mostly out of curiosity, to better understand the things under the hood)

Best regards,

Max

 

Affiliation
American Association of Variable Star Observers (AAVSO)
Photometry Guide: Last paragraph of page 61.

Max,

I have scratched my head over this paragraph as well.   Here I will paraphase what I think it is trying to say.

"The preceding three pages of algebra are here for those (such as yourself) who really want to understand the process.  If you're actually going to apply your transforms by this tedious, long-hand method just assume that for the target B-V = b-v.  But why bother?  Just use TA."  

Phil

Affiliation
American Association of Variable Star Observers (AAVSO)
Transformations: are colour index iterations needed or not?

If one defines:

B = b - kb'X - kb"(B-V)X + ab(B-V) + cb
and
V = v - kv'X - kv"(B-V)X + av(B-V) + cv

then it is possible to derive following:

B-V = ((b-v) - (kb'Xb - kv'Xv) + (cb - cv)) / (1 + (kb"Xb - kv"Xv) - (ab - av))
and
V = v + kv'Xv + av(B-V) + cv,

where kv', Xv, kv", av, and cv are respectively first order extinction in V-filter, airmass that corresponds to V-filter observation, second order extinction in V-filter, colour transformation coefficient for V=f(B-V) and zero point in V-filter. In principle, that applies to any combination of filters.

However, because very often B-V is quite similar to b-v, iterations converge quickly.. 2 steps should usually be "good enough" ..

Tõnis

 

Affiliation
American Association of Variable Star Observers (AAVSO)
TA's algorithms and methods and all that

Greetings Max,

I'm so happy to talk happy to talk about the details of TA and what transformation is all about!

The insight that I tried to bring to the transform process is to observe that it moves your observations to the standard. When you derived your transform coefficient for Tbv you plotted your instrumental b-v vs the reference B-V. Then you found the least-squares fit of this data. The line defined (and summarized with its slope as 1/Tbv) is how your system relates to the standard. Now plot your new observation on that graph. The transform process will find a B and V that moves your data to that line.

In the case of B and V there are 3 relationships, equations, to work with: one color and two magnitude.
Vs = Bs - (Bc-Vc) - Tbv* ((bs-vs)-(bc-vc))
Bs = bs + (Bc-bc) + Tb_bv * ((Bs-Vs)-(Bc-Vc))
Vs = vs + (Vc-vc) + Tv_bv * ((Bs-Vs)-(Bc-Vc))
But for two variables we only need 2 equations to solve it. We can chose any two of these three equations. Note too that the equations can be flipped: eg  Bs = Vs + (Bc-Vc) + Tbv* ((bs-vs)-(bc-vc))

There was lots of discussion in the committee that pushed the Year of the Transform, which was the motivation of TA, about the choice of the equations to use. My preference is to use the coeficients (equations) with the smallest error. This is almost always the color coefficient. But HQ prefered a recommended standard that emphasized the magnitude. I was just happy to do away with cases in the classic method that used 4 coefficients to solve for 3 variables. TA offers both the AAVSO recommended system, the 'alternate' system that always uses color coefficients and the classic equation set.

How does it solve? It starts with the guess that B=b and V=v and then iterates through the equation set until a stable result is found. Usually 4 iterations is enough.

What is the best way? There is no perfect answer. But if you have adjusted your observations to a standard model, its all to the good!

George

ps. As to differences with the Manual: I wasn't able to get them to rewrite the transform chapter so there's still the presentation of numbing algebra which I think just obscures the issue, turns it into a blackbox. At least the manual adopts my coefficient naming convention!

pps. TA always will show you the equation set that it uses. It's there on the Report tab after you process.
 

 

Affiliation
American Association of Variable Star Observers (AAVSO)
TransformApplier

Many thanks for the comprehensive answers!

The question is somewhat clearer now for me.

Indeed, having two equation with two variables we can get the answer... I missed this.

Regards,

Max

P.S. Currently I'm using DSLR for photometry (with newtonian, so my FOV is rather small -- less than one degree and the differenntial extinction is not so important), the transformation coefficients are rather big (Tbv is about 2). I'm aware that I should treat the results with care having big transformation factors, however it seems that TA works even in this situation.

P.P.S. Yet TA cannot handle ensemble photometry (I know the reasons) which I'm using (with helps of Excel-based calculations, treating each compstar separately and averaging results).

Affiliation
American Association of Variable Star Observers (AAVSO)
Iterations vs following the equation

My preference is to use the coeficients (equations) with the smallest error. This is almost always the color coefficient. But HQ prefered a recommended standard that emphasized the magnitude.

George, I think that HQ preferred individual magnitude based approach, because when using CCD-s (where almost always compstars are in the same frame with target), individual instrumental magnitudes are determined with higher accuracy (!) compared to colours (two filters means two frames that may experience changed extinction). IMHO accuracy of colour indices is intrinsically (opposite to instrumental magnitudes) higher only in the case when PEP obserserver is using target-comp-check-sky sequence so that for each pointing, measurements in all filters are observed very close in time.

I'm not sure if any iterations are needed at all, when all colour transformation coefficients are determined - there is one to one relation between Tv, Tb and Tv_bv or Tb_bv. By definition.

It seems to me, that one really can not avoid iterations when extinction coefficients are not (well) known and observation really requires correct handling of them (low airmass, wide FoV) OR when observations were done in one filter only.

George, out of curiocity - you describe the process where you do the assumption that B=b and V=v and then use iterative approach. But in TA, don't you already have T_bv? In that case it would be possible to do just (B-V)=T_bv*(b-v) (+constant, to be purist ;-) ). Are there any special situations I'm missing?

Greetings, Tõnis

Affiliation
American Association of Variable Star Observers (AAVSO)
TA iteration methods

Tonis,

You asked:
George, out of curiocity - you describe the process where you do the assumption that B=b and V=v and then use iterative approach. But in TA, don't you already have T_bv? In that case it would be possible to do just (B-V)=T_bv*(b-v) (+constant, to be purist ;-) ). Are there any special situations I'm missing?

TA is prepared to do transforms for 3 or 4 filters. Simplest to start with initial conditions that will apply to all cases. It keeps the code simpler too. Computers are fast and should be made to work!

George

 

Affiliation
American Association of Variable Star Observers (AAVSO)
Regarding "pseudo-code"

Well, I've made a function, which uses "brutal force" loop to calculate transformed B and V using only two  coefficients: Tv_bv and Tb_bv (color transformation coefficient can be used also (to make initial estimation), however, I found that the result almost the same in both cases (see test procedure)).

Sorry, I'cant guess how to use <code> format option: after preview, the message gets corrupted, so I put listing as a plain text.

You can try this VBA code using Excel VBA  -- simply copy the text into Excel VBA editor and run testTransform() procedure (macro) (actually I'm using "Transform()" function in my experimental transformation Excel spreadsheet as a user-defined function).

An output of an example testTransform() is:

Tbv is taken into account
V transformed = 10.8956570636525
B transformed = 10.9662720649798
Iterations    = 12

Tbv is ignored
V transformed = 10.8956618349865
B transformed = 10.9662557935075
Iterations    = 11

[start of code]

Option Explicit
Option Base 0

Private Const MAX_ITER = 100
Private Const PRECISION = 0.0001

' Transform pair of V, B values.
' Vraw, Braw: initial (not corrected) magnitudes (standartized)
' BVc: (B-V) catalog color index of a compstar
' Tv_bv: transformation coefficient [slope (v-V) vs (B-V)]
' Tb_bv: transformation coefficient [slope (b-B) vs (B-V)]
' Tbv: color transformation coefficient, if not used, you may specify Tbv=1.
' Returns one-dimentional array containing transformed V, B and number of iteration used.
Public Function Transform(Vraw As Double, Braw As Double, BVc As Double, Tv_bv As Double, Tb_bv As Double, Tbv As Double) As Variant
  Dim V As Double
  Dim B As Double
  Dim BV As Double
  Dim Vnext As Double
  Dim Bnext As Double
  Dim N As Integer
  Dim Result As Variant

  V = Vraw
  B = Braw
  BV = Tbv * (Braw - Vraw) 'Initial value

  N = 0
  Vnext = Vraw + Tv_bv * (BV - BVc)
  Bnext = Braw + Tb_bv * (BV - BVc)
  While (N < MAX_ITER) And (Abs(V - Vnext) > PRECISION) Or (Abs(B - Bnext) > PRECISION)
    N = N + 1
    V = Vnext
    B = Bnext
    BV = B - V
    Vnext = Vraw + Tv_bv * (BV - BVc)
    Bnext = Braw + Tb_bv * (BV - BVc)
  Wend

  V = Vnext
  B = Bnext

  ReDim Result(2)
  If N < MAX_ITER Then
    Result(0) = V
    Result(1) = B
  Else
    Result(0) = Null
    Result(1) = Null
  End If
  Result(2) = N
  Transform = Result

End Function

Private Sub testTransform()
  Dim R As Variant

  R = Transform(10.828, 11.197, 0.649, -0.117, 0.399, 2.069) ' the last 3 parameters is my Canon EOS600D transformation coefficients
  Debug.Print "Tbv is taken into account"
  Debug.Print "V transformed = " & R(0)
  Debug.Print "B transformed = " & R(1)
  Debug.Print "Iterations    = " & R(2)
  
  Debug.Print ""
  R = Transform(10.828, 11.197, 0.649, -0.117, 0.399, 1) ' 1 instead of Tbv to ignore it
  Debug.Print "Tbv is ignored"
  Debug.Print "V transformed = " & R(0)
  Debug.Print "B transformed = " & R(1)
  Debug.Print "Iterations    = " & R(2)
End Sub