Why is airmass incorrect in VPhot. Still puzzled

I have checked FITS files and they are correct in all the parameters that VPhot would use:
RA, Dec, Obs Lat, Obs Long, Date, Julian day, Time.

E.G. I made two sequential observations of AD Leo. It was at an altitude of 40 degrees (airmass calc as 1.55). In VPot The first has an airmass of 4.80, the second has airmass of zero. All the obs on the same night are way out. All data are automatically placed in FITS files by my AISair controller so I have no real control over it.
What is going on please?

I don’t know about the airmass issue, but I found that using J2000 cordinates in my photometric software for AD Leo led to crazy results as the star has a high proper motion and was not being identified in plate solving accurately. I entered more recent measurements of the coordinates and got the expected results. I used 10h 19m 35.42" and +19 52m 11.40". I don’t know if that will help or not.
Clear skies!
Rick

Thanks but no. The problem is not confined to AD Leo

It is odd, but probably has a simple fix, I hope.
Rick

Hi,

I’m one of the developer maintaining Vphot, can you share in Vphot some of the images where you have the airmass issue? The obscode to share with is NGIA.

I’ll try to take at look at the issue in the next few days (we are all volunteers so please have a bit of patience)

Thanks for looking. I’m not in any great hurry although I fear many observations will either have to be deleted and re-run through VPhot.
I did try that with the images I have shared with you, but they came out the same (incorrect) airmass.
Regards
Kevin

Is it a matter of having your coordinate LAT and LONG in the header?

Ray

thanks for sharing the images, in the week end I’ll do some checks

have a nice day

Calculad

3d

I have checked FITS files and they are correct in all the parameters that VPhot would use:
RA, Dec, Obs Lat, Obs Long, Date, Julian day, Time

Hello Roy, I’m confused by your response.

Kevin,

It is a copy of part of your post from a few days ago. It was for Ray (TRE), who asked in a recent post about LAT and LONG in your FITS headers.

Ah Thanks Roy
I wondered why he asked.
Kevin

Hi Kevin,

thanks again for sharing the images, I checked the FITS headers and the airmass is specified in them, the value is the same you see in the images list.

I stacked them and the stacker just computes the mean value, I did also a time series of the original images and for each image the airmass is the same value shown in the FITS headers

In the comment there is a reference to a wrapper, what is it?

I\m checking the Vphot code and there is a function that computes airmass from date,time object coordinates and observer lat/long but it’s used only in certain situations (I’m checking the details about it) but in the case of the four images you shared and the operations I did I’d say that what’s in the FITS headers is taken into consideration.

Hi Kevin,

I must correct myself, the airmass header is added by Vphot during the platesolving.

Could you please send me a private message here on the forum attaching the original images that you uploaded to Vphot and the coordinates of the observatory and possibly the datetime of the images from a reliable source?

With the original images I can run the debugger and verify every step of the computation.

Thanks

Hello Gianlucanigro,

First, thanks for spending precious time on this. I have uploaded the files using the link in your post. I conducted two separate B/V obs and didn’t stack them because AD Leo is a flare star with potential sub hour fluctuations(in case you wondered) .

I checked all the parameters you mentioned and anything else I could think of that might be used to calculate airmass. They are all correct in the header of these files. I also just noticed that all the files in error have a airmass header reading of zero. These are output by my stacking software ASTAP.

In fact I just looked back at all my obs and ASTAP assigns zero to all airmass values so I guess that means it doesn’t calculate it.

The FITS files of the original raw images from AISair controller have no row entry available even for airmass.

Regards

Kevin

Hi Kevin,

I did an extensive check on the airmass issue, the complete scenario is the following.

If airmass is specified in the original FITS file Vphot uses it as is.

If airmass is missing or zero in the original FITS file Vphot compute airmass using the approximation proposed by Hardy in 1962

X = sec(z) − 0.0018167(sec z−1) − 0.002875(sec z−1)² − 0.0008083(sec z−1)³

As this approximation should be good up to airmass of 6 in Vphot a conservative limit was applied in the code.

If the computed airmass is greater than 5 the computed value is rejected and zero is put instead in a dedicated FITS header.

I checked the original images you sent to me and data about ra, dec, lat, long and datetime were correct but I computed the airmasses for all of them and found out that for the images getting 0 as airmass the computed values were just over 5 even using other more recent approximations published.

Given the hard limit imposed on the computed airmass value this explain the zeroes you saw in your images.

I hope this solves the issue you raised.

Hello Gianluca,

Many thanks for your time on this but sadly I’m still very confused by your results and the conflict between VPhot and my calculations [1] of airmass .

AISair (computer/controller) displays altitude, which I record in my notes (but does not put it to FITS file) and I used this in the following website [1] to check a large sample of my obs up to and including 19th Dec 2025. There is a good agreement on all these obs with my calcd airmass and what VPhot output.

Obs on 2026 02 24 and 2026 02 28 are disagreeing hugely. (Alt ~40degrees)

For the first obs on AD Leo 2026 02 24 VPhot gives A~ 4.80

For the second obs 3 mins later VPhot gives zero.

This surely is suspicious.

Another striking anomaly is obs of BR CVn and TXCVn (2026 02 24) which have identical altitudes of 36 degrees and should have the same airmass. VPhot gives 2.118 and 3.127 respectively. Both are incorrect with my estimate [1] as 1.70

For the record I never observe below 30 degrees. Airmass ~ 2

[1] Air Mass Calculator – Atmospheric Effects on Astronomy

Kevin:

Do your fits headers report target RA as sexigesimal, decimal hours or decimal degrees? What fits header units do you use for your longitude? Do your different imaging softwares (if you have used more than one over time) use different unit formats?

Ken