Dear all,
I loaded flux data to VSTAR but I do not succeed to transform these data
to magnitudes. I installed the plugin but do not find where to get transformed values
Do you know where to find ?
Thanks
Best
Jeff
Dear all,
I loaded flux data to VSTAR but I do not succeed to transform these data
to magnitudes. I installed the plugin but do not find where to get transformed values
Do you know where to find ?
Thanks
Best
Jeff
Hi Jeff
Welcome to the forum. ![]()
Can you tell me what observation source you are loading from, e.g. Kepler or some other FITS file and what plugin you are using?
If you can also attach the file, that would help me reproduce what you are seeing.
Thanks.
David
Dear David
Thanks for your reply.
It is a simple 2 columns JD/flux
here is the file, I suppose that we enter somewhere the magnitude for flux = 1 in VSTAR ?
Best
Jeff
test_2COL.txt (509 Bytes)
Hi Jeff
Apologies for the delay.
There is not currently a specific feature for converting flux to magnitude.
It would be possible to do this via an observation transformer plugin, and we could experiment with this using the VeLa Observation Transformer plugin which can be installed via Tool → Plug-in Manager (VeLa observation transformation tool) with a formula like:
mag = -2.5*log10(flux/flux0)
where flux is a value in your file and flux0 is the zero-point flux for the source photometric system. flux0 may relate to your comment about entering the magnitude for flux = 1.
Is this heading in the direction you are after?
It would also be possible to create a custom observation transformer plugin.
David
Dear David
Many thanks for your reply.
ok I wondered what was VELA. It is used to create formulae.
I thought (but I was wrong) that a specific feature was included in VSTAR
to convert flux to magnitudes but we must do it ourself..
I will look at this when I will have some time
Thanks
Best regards
Jeff
Thanks Jeff.
Yes, VeLa can be used for even more than that. It’s essentially VStar’s scripting language, but expressions and functions are the focus:
VeLa · AAVSO/VStar Wiki · GitHub
We can prototype this with VeLa before writing a custom plugin.
Tracking this issue at Create flux to magnitude observation transformer plugin · Issue #568 · AAVSO/VStar · GitHub
David
Hi again Jeff
I also meant to ask: when you say flux here, do you mean instrumental magnitudes from photometry (of CCD/DSLR/… images) or is the flux here something else?
David
Dear David, I mean real flux 1 = max, not instrumental magnitudes
many thanks for your links for VELA I will read at them ![]()
Dear David
I began to read the vela process following your replies
I used vela observation transformer
and wrote this to do a try
flux0 is 1
do():list {
[-2.5*log10(magnitude/flux0) error]
}
I get this error message
“Failed to parse the full string: 2.5”
Do you have an idea of the problem ?
Thanks
Jeff
This may be a localisation issue. Change -2.5 to -2,5
David
Oh yes of course it was a problem of decimal point.
Now it works.
Many thanks David
Just a more question
The language of VELA is how to say a little “complex” with [ anf {
Is there a specific reason ?
Why not to use simple command as in basic or python to do a so simple calculation ?
Thanks
Best
Jeff
No worries Jeff.
Perhaps you could give one or more examples of how another language such as Python would simplify a specific code example? Were you thinking of something like the observation transformer function we’ve been talking about or something else?
Thanks.
David
Dear David,
I was thinking about the magnitude row especially
because we often have flux data
we could imagine writing some simple code like
magnitude<-- (-2.5*log(magnitude/ref_flux))
But my question was a general question.
Why the synthax of the vela language is so different of other languages such as python, basic or C…
Best
Jeff
It’s a fair question Jeff.
Looking at the code example I gave for use with the transformer plugin:
flux0 is 1
do():list {
[-2.5*log10(magnitude/flux0) error]
}
the apparent peculiarity/complexity here is due to the requirements of the VeLa transformer plugin. It does not currently support an undo operation, but could in future. An Edit → Undo operation simply restores the observations before they were changed.
So, the reason for do here is that this is a function that the VeLa observation transformer expects to be able to call.
The {…} is the body of the parameterless do() function, just as in a C function.
do() is expected to to return a list (do():list). [-2.5*log10(magnitude/flux0) error] is that list, the first element of which is the transformed magnitude value (well, flux to magnitude here) and the second is the error value, here unchanged.
But yes, if there was no future possible undo() function, then do() would be unnecessary and if only the transformed magnitude needed to be returned, this would be all you’d need:
flux0 is 1
-2.5*log10(magnitude/flux0)
There are VeLa usages within VStar that are simple expressions, e.g. VeLa filters. On the other hand, you’ll see some complex functions (e.g. Fourier, polynomial) and sometimes additional supporting code for models (e.g. Loess).
I hope that helps, but please feel free to ask more or challenge the design of VeLa.
Thanks.
David
Dear David,
I thank you for these explanations and will ask you
in the future if necessary.
Best
Jeff
Hi Jeff
No problem. See also VeLa · AAVSO/VStar Wiki · GitHub for language details and examples.
Note also that on a somewhat related note, this will be fixed in the next release also:
Portability of VeLa code with localised numbers · Issue #605 · AAVSO/VStar · GitHub
VeLa is still evolving.
David