> Depends on what language you are using but from a shell script you can:
>
> starperl -MAstro::SLA -e 'print Astro::SLA::slaAirmas(0.5)'
I think Eduardo wants more than merely converting a zenith distance in
radians to an airmass.
The bottom line is there is no off-the-shelf equivalent in the Starlink
collection to the STSDAS setairmass function. However, all the
components needed to create one are there in various libraries such as
SLALIB and KAPLIBS. This is something that might have been provided
with SC/6 "The CCD Photometric Calibration Cookbook". In the days of
the Quick programming service we could have knocked up a script
or task for you.
An outline is:
- define default keyword names (& provide options/parameters for
those that change if you want to make it more general)
- obtain the values of the required parameters from the FITS headers
- convert observatory name to latitude and longitude (if not in header
and you want to be general)
- convert sexagesimal strings to radians
- evaluate mean airmass
- write airmass to chosen keyword
Details depend on the implementation. For my own CCD data reduction I
always scripted them to make re-reduction easier. However, in this case
it might be easier in a high-level language.
Malcolm
----
Starlink User Support list
For list configuration, including subscribing to and unsubscribing from the list, see
https://www.jiscmail.ac.uk/cgi-bin/webadmin?A0=STARLINK
|