FITS Header Configuration#
Astra automatically generates comprehensive FITS headers for all captured images using metadata from your observatory devices. This system ensures every image contains the scientific metadata required for analysis.
The FITS header system uses a CSV configuration file that maps device properties and observatory parameters to standard FITS keywords. This approach provides flexibility while maintaining consistency across observations.
Configuration File Format#
The CSV configuration file defines how FITS headers are constructed:
header: FITS header keyworddtype: Data type (string, integer, float, boolean)fixed: Whether the value is set at the beginning of an imaging sequence (true) or filled later from polled device properties stored in the SQLite database (false)device_type: Source (ASCOM Alpaca device,staticfor unchanging values,astrafor Astra calculated/derived values,astropy_defaultfor standard headers filled by Astropy)device_command: ASCOM device property, a static value, or empty.comment: Description of the header keyword
Example Configuration#
header |
dtype |
fixed |
device_type |
device_command |
comment |
|---|---|---|---|---|---|
SIMPLE |
bool |
true |
astropy_default |
conforms to FITS standard |
|
BITPIX |
int |
true |
astropy_default |
array data type |
|
NAXIS |
int |
true |
astropy_default |
number of array dimensions |
|
NAXIS1 |
int |
true |
astropy_default |
of pixels/row |
|
NAXIS2 |
int |
true |
astropy_default |
of rows (also # of scan lines) |
|
EXTEND |
bool |
true |
static |
1 |
Extensions may be present |
BZERO |
float |
true |
astropy_default |
value = fits-value*BSCALE+BZERO |
|
BSCALE |
float |
true |
astropy_default |
value = fits-value*BSCALE+BZERO |
|
BUNIT |
str |
true |
static |
ADU |
Physical unit of array values |
BLANK |
int |
true |
static |
-32768 |
Value used for NULL pixels |
ORIGIN |
str |
true |
static |
ORIGIN |
Observatory |
TELESCOP |
str |
true |
static |
TELESCOPE |
Telescope Name |
INSTRUME |
str |
true |
static |
INSTRUMENT |
Instrument used |
PI-COI |
str |
true |
static |
PI-COI |
Name of the PI/Co-I |
OBSERVER |
str |
true |
static |
Astra |
Name of the observer |
OBJECT |
str |
true |
astra |
Target as given by the user |
|
RADESYS |
str |
true |
static |
FK5 |
Reference system |
EQUINOX |
float |
true |
static |
2000 |
Catalog equinox of the object coords |
DATE |
str |
false |
astra |
UTC datetime file written |
|
MJD-OBS |
float |
false |
astra |
Modified Julian Date at start of exposure |
|
DATE-OBS |
str |
false |
astra |
UTC datetime start of exposure |
|
TIMESYS |
str |
true |
static |
UTC |
Time system used |
EXPTIME |
float |
true |
astra |
[s] Exposure time |
|
LST |
float |
false |
astra |
[s] Local Sidereal Time at start of exposure |
|
HA |
str |
false |
astra |
[hms] Hour Angle |
|
CHECKSUM |
str |
false |
astra |
HDU checksum |
|
DATASUM |
str |
false |
astra |
Data unit checksum |
|
XBINNING |
int |
true |
Camera |
BinX |
Binning level along the X-axis |
YBINNING |
int |
true |
Camera |
BinY |
Binning level along the Y-axis |
XPIXSZ |
float |
true |
astra |
Pixel Width in microns (after binning) |
|
YPIXSZ |
float |
true |
astra |
Pixel Height in microns (after binning) |
|
XORGSUBF |
int |
true |
Camera |
StartX |
Subframe X position in binned pixels |
YORGSUBF |
int |
true |
Camera |
StartY |
Subframe Y position in binned pixels |
CAM-SNAM |
str |
true |
Camera |
SensorName |
Camera sensor name |
CAM-STYP |
str |
true |
Camera |
SensorType |
Camera sensor type |
CAM-DNAM |
str |
true |
Camera |
Name |
Name of Camera driver |
CAM-DVER |
str |
true |
Camera |
DriverVersion |
Camera driver version |
SET-TEMP |
float |
true |
Camera |
SetCCDTemperature |
[Celsius] CCD temperature setpoint |
CCD-TEMP |
float |
false |
Camera |
CCDTemperature |
[Celsius] CCD temperature at start of exposure |
CAM-STAT |
int |
false |
Camera |
CameraState |
Camera status |
FILTER |
str |
true |
astra |
Filter name |
|
FW-POS |
str |
false |
FilterWheel |
Position |
FilterWheel position |
FW-NAME |
str |
true |
FilterWheel |
Name |
FilterWheel name |
FW-DVER |
str |
true |
FilterWheel |
DriverVersion |
FilterWheel driver version |
FOCUSPOS |
float |
false |
Focuser |
Position |
[steps] Focuser position |
FOCUSSSZ |
float |
true |
Focuser |
StepSize |
[micron] Focuser step size |
FOCUSTEM |
float |
false |
Focuser |
Temperature |
[Celsius] Focuser temperature |
RA |
float |
false |
Telescope |
RightAscension |
[deg] Target Right Ascension |
DEC |
float |
false |
Telescope |
Declination |
[deg] Target Declination |
APTAREA |
float |
true |
astra |
ApertureArea |
[m^2] Aperture area of telescope |
APTDIA |
float |
true |
astra |
ApertureDiameter |
[m] Aperture diameter of telescope |
FOCALLEN |
float |
true |
astra |
FocalLength |
[m] Focal length of telescope |
ALT-OBS |
float |
true |
Telescope |
SiteElevation |
[m] Altitude above mean sea level |
LAT-OBS |
float |
true |
Telescope |
SiteLatitude |
[deg +N WGS84] Geodetic latitude |
LONG-OBS |
float |
true |
Telescope |
SiteLongitude |
[deg +E WGS84] Geodetic longitude |
ALTITUDE |
float |
false |
Telescope |
Altitude |
[deg] Telescope altitude |
AZIMUTH |
float |
false |
Telescope |
Azimuth |
[deg] Telescope azimuth |
AIRMASS |
float |
false |
astra |
Averaged airmass |
|
TEL-DNAM |
str |
true |
Telescope |
Name |
Name of Telescope driver |
TEL-DVER |
str |
true |
Telescope |
DriverVersion |
Telescope driver version |
TRACKING |
bool |
false |
Telescope |
Tracking |
Tracking |
SLEWING |
bool |
false |
Telescope |
Slewing |
Slewing |
TELPARK |
bool |
false |
Telescope |
AtPark |
Telescope at park |
PIERSIDE |
bool |
false |
Telescope |
SideOfPier |
Telescope side of pier (1 = West 0 = East) |
DOMEAZ |
float |
false |
Dome |
Azimuth |
[deg] Dome azimuth |
DOMESTAT |
int |
false |
Dome |
ShutterStatus |
Dome shutter status |
DOM-DNAM |
str |
true |
Dome |
Name |
Name of Dome driver |
DOMPARK |
bool |
false |
Dome |
AtPark |
Dome at park |
IMAGETYP |
str |
true |
astra |
Type of image |
|
DEWPOINT |
float |
false |
ObservingConditions |
DewPoint |
[Celsius] Dew point |
HUMIDITY |
float |
false |
ObservingConditions |
Humidity |
[%] Ambient atmospheric humidity |
AMBTEMP |
float |
false |
ObservingConditions |
Temperature |
[Celsius] Ambient temperature |
WINDSPD |
float |
false |
ObservingConditions |
WindSpeed |
[m/s] Wind speed |
SKYTEMP |
float |
false |
ObservingConditions |
SkyTemperature |
[Celsius] Sky temperature |
OBC-DNAM |
str |
true |
ObservingConditions |
Name |
Name of ObservingConditions driver |
OBC-DVER |
str |
true |
ObservingConditions |
DriverVersion |
ObservingConditions driver version |
SAF-DNAM |
str |
true |
SafetyMonitor |
Name |
Name of SafetyMonitor driver |
SAF-DVER |
str |
true |
SafetyMonitor |
DriverVersion |
SafetyMonitor driver version |
JD-OBS |
float |
false |
astra |
Julian Date at start of exposure |
|
HJD-OBS |
float |
false |
astra |
Heliocentric Julian Date at start of exposure |
|
BJD-OBS |
float |
false |
astra |
Barycentric Julian Date at start of exposure |
|
JD-END |
float |
false |
astra |
Julian Date at end of exposure |
|
MJD-END |
float |
false |
astra |
Modified Julian Date at end of exposure |
|
DATE-END |
str |
false |
astra |
UTC datetime at end of exposure |
|
ASTRA |
str |
true |
astra |
Version of Astra |
How FITS Headers Are Created#
Astra creates FITS headers in two stages to ensure complete and accurate metadata:
1. Base Headers (at the beginning of an imaging sequence)#
When an imaging sequence begins, Astra immediately creates an initial FITS header containing (if fixed=true in the FITS configuration), such as:
Observatory information: Site name, coordinates
Telescope properties: Aperture diameter, area, focal length
Observation metadata: Object name, exposure time, image type placeholders
Software information: Astra version number
IMAGETYP changes dynamically based on the imaging sequence (e.g., ‘Light Frame’, ‘Dark Frame’, ‘Bias Frame’, ‘Flat Frame’).
2. Final Headers (after schedule ends)#
After an imaging sequence, Astra completes any missing header values:
Identifies images with incomplete headers
Retrieves device polling data from ±10 seconds around each exposure time (stored in the local SQLite database)
Interpolates device readings (e.g. ambient temperature, focus position, etc.) to match exposure timestamps
Updates FITS files in place while preserving original header structure
Adds calculated values such as:
Various time scales and reference frames
Derived parameters like airmass
Checksum and datasum values
This two-stage approach ensures headers contain accurate, time-synchronized metadata, while minimising time loss between exposures.
Customizing FITS Headers#
You can customize the FITS headers by modifying the CSV configuration file:
Adding headers: Add new rows to include additional metadata
Removing headers: Delete rows to exclude certain keywords
Timing control: Set
fixed=Truefor immediate values,fixed=Falsefor post-exposure interpolated values