HawcPlusSimulation

class sofia_redux.scan.custom.hawc_plus.simulation.simulation.HawcPlusSimulation(info)[source]

Bases: ABC

Initialize a HAWC+ simulation.

Parameters:
infoHawcPlusInfo

Attributes Summary

data_column_definitions

default_comments

default_values

sim_keys

Methods Summary

create_basic_hdul([ra, dec, site_longitude, ...])

Create a basic HDU list containing the basic primary header info.

create_configuration_hdu()

Create the configuration HDU for the simulated data.

create_primary_header([ra, dec, ...])

Create a simulated observation primary header.

create_simulated_data()

Populate the SQ1Feedback column values for the data HDU.

create_simulated_hdul([ra, dec, ...])

Create an HDU list containing simulated data.

create_simulated_jumps()

Add jumps to the data HDU columns.

create_source_model()

Create the simulated source model.

default_comment(key)

Return the default comment for a given key.

default_primary_header(header_options)

Create a default primary header.

default_value(key)

Return the default value for a given key.

get_daisy_equatorial()

Return the equatorial offsets for a daisy scan pattern.

get_data_hdu()

Return a FITS BinTable containing current data.

get_hwp_column(utc)

Return the hwpCounts values for the FITS data HDU.

get_lissajous_equatorial()

Return the equatorial offsets for a Lissajous scan pattern.

get_location_columns(utc)

Return the LON/LAT values for the FITS data HDU.

get_los_column(utc)

Return the LOS values for the FITS data HDU.

get_nonsidereal_columns(utc)

Return the Nonsidereal RA/DEC values for the FITS data HDU.

get_pwv_column(utc)

Return the PWV values for the FITS data HDU.

get_roll_column(utc)

Return the ROLL values for the FITS data HDU.

initialize_aircraft()

Set the aircraft parameters.

set_source(ra, dec[, header_options])

Set the source RA and Dec coordinates.

set_start_site(longitude, latitude[, ...])

Set the site longitude and latitude at the start of the observation.

set_times(timestamp[, header_options])

Set the times for the observation.

update_astronomical_columns()

Update the astronomical columns for the FITS data HDU.

update_chopper()

Add chopper signals to the astronomical positions.

update_hdul_with_data()

Create the data HDU.

update_header_band(header)

Update a given header with HAWC band information.

update_header_chopping(header)

Update the chopping configuration in the header.

update_header_daisy(header)

Update the daisy scanning parameters in the header.

update_header_dithering(header)

Update the dithering configuration in the header.

update_header_focus(header)

Update the focus configuration in the header.

update_header_hwp(header)

Update the half-wave-plate configuration in the header.

update_header_lissajous(header)

Update the Lissajous scanning parameters in the header.

update_header_mapping(header)

Update the mapping configuration in the header.

update_header_nodding(header)

Update the nodding configuration in the header.

update_header_origin(header)

Update the origin-like parameters in the header.

update_header_raster(header)

Update the raster scanning parameters in the header.

update_header_scanning(header)

Update the skydip configuration in the header.

update_header_skydip(header)

Update the skydip configuration in the header.

update_header_value(header, key, value)

Update the header with a new value.

update_header_weather(header)

Update the weather parameters in the header.

update_non_astronomical_columns()

Create column values for the FITS data HDU that are not astronomical.

update_primary_header_with_data_hdu()

Fill in the missing values in the primary header using data values.

update_vpa_columns()

Update the VPA columns for the FITS data HDU.

write_simulated_hdul(filename[, ra, dec, ...])

Write a simulated HDU list to file.

Attributes Documentation

data_column_definitions = {'AZ': ('degrees', '1D'), 'Chop_VPA': ('degrees', '1D'), 'DEC': ('degrees', '1D'), 'EL': ('degrees', '1D'), 'Flag': ('flag', '1J'), 'FluxJumps': ('jumps', '#I'), 'FrameCounter': ('frames', '1K'), 'LAT': ('degrees', '1D'), 'LON': ('degrees', '1D'), 'LOS': ('degrees', '1D'), 'LST': ('hours', '1D'), 'NonSiderealDec': ('degrees', '1D'), 'NonSiderealRA': ('hours', '1D'), 'PWV': ('um', '1D'), 'RA': ('hours', '1D'), 'ROLL': ('degrees', '1D'), 'SIBS_VPA': ('degrees', '1D'), 'SQ1Feedback': (None, '#J'), 'TABS_VPA': ('degrees', '1D'), 'Timestamp': ('seconds', '1D'), 'hwpCounts': ('counts', '1J'), 'sofiaChopR': ('volts', '1E'), 'sofiaChopS': ('volts', '1E')}
default_comments = {'AIRSPEED': 'True aircraft airspeed [knots]', 'ALTI_END': 'Aircraft pressure altitude, end of observation [feet]', 'ALTI_STA': 'Aircraft pressure altitude, start of observation [feet]', 'AOR_ID': 'Astronomical Observation Request ID', 'BSITE': 'boresight name - hawc_plus.si_config.current_mode', 'CALMODE': 'Diagnostic procedure mode', 'CDELT1': 'Plate scale for the n-th axis at ref pnt [deg/pix]', 'CDELT2': 'Plate scale for the n-th axis at ref pnt [deg/pix]', 'CHOPPING': 'Chopping flag', 'CHPAMP1': 'Chop amplitude 1 [arcsec]', 'CHPAMP2': 'Chop amplitude 2 [arcsec]', 'CHPANGLE': 'Calc angle in the sky_coord_sys ref frame [arcsec]', 'CHPCRSYS': 'MCCS coord sys for sky tip, tilt, and angle', 'CHPFREQ': 'Chop frequency [Hz]', 'CHPONFPA': 'Is chop on-chip or off-chip.', 'CHPPHASE': 'Chop phase [ms]', 'CHPPROF': 'Chopping profile: 2 or 3 point', 'CHPSRC': 'Chop sync src [external,internal]', 'CHPSYM': 'Chopping symmetry: symmetric or asymmetric', 'CHPTILT': 'Calc tilt in the sky_coord_sys ref frame [arcsec]', 'CHPTIP': 'Calc tip in the sky_coord_sys ref frame [arcsec]', 'CMTFILE': 'MCCS Comment Filename', 'COLLROTR': 'Collimation position r - ta_scs.fcm_status.fcm_des_coll_rot_r', 'COLLROTS': 'Collimation position s - ta_scs.fcm_status.fcm_des_coll_rot_s', 'CREATOR': 'File creation task', 'DADEC0': 'Drift 0 after Dec [deg]', 'DARA0': 'Drift 0 after RA [hours]', 'DATAQUAL': 'Data quality', 'DATASRC': 'Data source', 'DATATYPE': 'Data type', 'DATE': 'Date of file creation', 'DATE-OBS': 'UTC date of exposure start', 'DATIME0': 'Drift 0 after time [seconds]', 'DBDEC0': 'Drift 0 begin Dec [deg]', 'DBRA0': 'Drift 0 begin RA [hours]', 'DBTIME0': 'Drift 0 begin time [seconds]', 'DEPLOY': 'Site deployment', 'DETECTOR': 'Detector name', 'DETSIZE': 'Detector size', 'DIAG_HZ': 'Diagnostic procedure chop rate (if used) [hz]', 'DITHER': 'Dithering flag', 'DTHCRSYS': 'Coordinate system for dithering', 'DTHINDEX': 'Dither position index', 'DTHNPOS': 'Number of dither positions', 'DTHPATT': 'Dither pattern', 'DTHSCALE': 'Dither scale [float]', 'DTHUNIT': 'Dither units - pixel or arcsec', 'DTHXOFF': 'Dither offset in X for this file', 'DTHYOFF': 'Dither offset in Y for this file', 'EQUINOX': 'Coordinate equinox for OBSRA and OBSDEC [yr]', 'EXPTIME': 'On-source exposure time [s]', 'FBC-STAT': 'FBC Status at observation end', 'FCSCOEFA': 'focus_coef_a', 'FCSCOEFB': 'focus_coef_b', 'FCSCOEFC': 'focus_coef_c', 'FCSCOEFK': 'focus_coef_k', 'FCSCOEFQ': 'focus_coef_q', 'FCSDELTA': 'focus_delta', 'FCST1': 'focus_param_value_t1', 'FCST1NM': 'focus_param_t1', 'FCST2': 'focus_param_value_t2', 'FCST2NM': 'focus_param_t2', 'FCST3': 'focus_param_value_t3', 'FCST3NM': 'focus_param_t3', 'FCSTCALC': 'focus_fcm_t_calc', 'FCSTOFF': 'focus_total_offset', 'FCSX': 'focus_param_value_x', 'FCSXNM': 'focus_param_x', 'FILEGPID': 'File group ID', 'FILENAME': 'Name of host file', 'FILTER': 'rowstart,rowend,colstart,colend', 'FLIGHTLG': 'Flight leg', 'FOCUS_EN': 'Telescope focus - SMA FCM t position, obs. end [um]', 'FOCUS_ST': 'Telescope focus - SMA FCM t position, obs. start [um]', 'GRDSPEED': 'Aircraft ground speed [knots]', 'HAWC_VER': 'HAWC+ CDH Software Version', 'HEADING': 'Aircraft true heading [deg]', 'HEADSTAT': 'Header status', 'HWPHOME': 'HOME HWP threshold [volts]', 'HWPOFF': 'OFF HWP threshold [volts]', 'HWPON': 'ON HWP threshold [volts]', 'HWPSEQ': 'HWP list of angles [degs]', 'HWPSPEED': 'HWP speed', 'HWPSTART': 'HWP initial angle [deg]', 'HWPSTEP': 'HWP step [deg]', 'INSTCFG': 'Instrument configuration (int., polar.)', 'INSTMODE': 'Instrument observing mode (c2n, otfmap)', 'INSTRUME': 'Instrument', 'INTCALV': 'INT-CAL voltage', 'KWDICT': 'SOFIA keyword dictionary version', 'LASTREW': 'Time of last rewind (UTC)', 'LAT_END': 'Aircraft latitude, end of observation [deg]', 'LAT_STA': 'Aircraft latitude, start of observation [deg]', 'LON_END': 'Aircraft longitude, end of observation [deg]', 'LON_STA': 'Aircraft longitude, start of observation [deg]', 'MAPCRSYS': 'Mapping coordinate system', 'MAPINTX': 'Map step interval in X [arcmin]', 'MAPINTY': 'Map step interval in Y [arcmin]', 'MAPNXPOS': 'Number of map positions in X', 'MAPNYPOS': 'Number of map positions in Y', 'MAPPING': 'Mapping flag', 'MCCSMODE': 'MCCS SI Mode - hawc_plus.si_config.current_mode', 'MCEMAP': 'MCEs mapped to r0,r1,t0,t1 arrays', 'MISSN-ID': 'Mission ID', 'NHWP': 'Number of HWP angles', 'NODAMP': 'Nod amplitude on sky [arcsec]', 'NODANGLE': 'Nod angle [deg]', 'NODBEAM': 'Current nod beam position', 'NODCRSYS': 'Coordinate system for Nod angle', 'NODDING': 'Nodding flag', 'NODN': 'Nod cycles', 'NODPATT': 'Nodding pattern, one cycle', 'NODSETL': 'Nod settle time [s]', 'NODSTYLE': 'Chop/nod style', 'NODTIME': 'Nod time [s]', 'OBJDEC': 'coord.pos.target DEC [deg]', 'OBJECT': 'Object name', 'OBJRA': 'coord.pos.target RA [hours]', 'OBSDEC': 'Requested DEC [deg]', 'OBSERVER': 'Observer(s)', 'OBSMODE': 'Observation mode [Scan, ChopScan, DitherChopNod]', 'OBSRA': 'Requested RA [hours]', 'OBSTYPE': 'Observation type', 'OBS_ID': 'SOFIA Observation identification', 'OPERATOR': 'Telescope operator', 'ORIGIN': 'Origin of FITS file', 'PIXSCAL': 'Pixel scale [arcsec]', 'PLANID': 'Observing plan ID', 'PROCSTAT': 'Processing status', 'RPTFILT': 'Reported filter position from OMS', 'RPTPUPIL': 'Reported pupil position from OMS', 'SCANNING': 'Scanning flag', 'SCNAMPEL': 'Lissajous scan amplitude in elevation [arcsec]', 'SCNAMPXL': 'Lissajous scan amplitude in cross-elevation [arcsec]', 'SCNANGLC': 'Current scan angle [deg]', 'SCNANGLF': 'Scan angle finish (last iteration) [deg]', 'SCNANGLS': 'Scan angle start (first iteration) [deg]', 'SCNCONST': 'Scanned at constant speed', 'SCNCROSS': 'Raster scan includes paired cross-scan?', 'SCNCRSYS': 'Scan coordinate system', 'SCNDNOSC': 'Daisy scan number of oscillations', 'SCNDPER': 'Daisy scan radial period [seconds]', 'SCNDRAD': 'Daisy scan radius [arcsec]', 'SCNDUR': 'Lissajous requested scan duration [sec]', 'SCNFQRAT': 'Lissajous pattern frequency ratio', 'SCNITERS': 'Scan iterations', 'SCNLEN': 'Raster length of single scan line [pix or arcsec]', 'SCNNSUBS': 'Raster number of subscans', 'SCNPATT': 'Scan pattern [Raster, Lissajous, Daisy]', 'SCNPHASE': 'Lissajous pattern relative phase offset [deg]', 'SCNRATE': 'Scan rate [arcsec/s]', 'SCNSTEP': 'Raster size of step from one linear scan to the next [pix or', 'SCNSTEPS': 'Raster number of linear scan lines', 'SCNTOFF': 'Lissajous pattern relative time offset [sec]', 'SCNTRKON': 'Track continuously while scanning [0,1]', 'SCNTWAIT': 'Scan tracking measurement window [sec]', 'SDELMID': 'Skydip elevation at middle [deg]', 'SDELSTEN': 'Skydip elevation at start and end [deg]', 'SDWTEND': 'Skydip wait at end [sec]', 'SDWTMID': 'Skydip wait at middle [sec]', 'SDWTSTRT': 'Skydip wait at start [sec]', 'SIBS_X': 'SI pixel location of boresight (X)', 'SIBS_Y': 'SI pixel location of boresight (Y)', 'SMPLFREQ': 'Sampling frequency [Hz]', 'SPECTEL1': 'HAWC filter setting: HAW_A, HAW_B, etc', 'SPECTEL2': 'HAWC pupil setting: HAW_HWP_A, etc', 'SRCSIZE': 'The FWHM of the simulated source', 'SRCTYPE': 'Source type', 'TELCONF': 'Telescope configuration', 'TELDEC': 'SI Boresight DEC (ICRS J2000) [deg]', 'TELEL': 'Telescope elevation at obs. start - as returned by MCCS [deg]', 'TELEQUI': 'Equinox of ERF coords(RA/Dec/VPA)', 'TELESCOP': 'Telescope name', 'TELLOS': 'Telescope LOS at obs. start - as returned by MCCS [deg]', 'TELRA': 'SI Boresight RA (ICRS J2000) [hours]', 'TELVPA': 'SI Boresight VPA (ICRS J2000) [deg]', 'TELXEL': 'Telescope cross elevation at obs. start - as returned by MCCS [deg]', 'TEMPPRI1': 'Temperature of primary mirror [C]', 'TEMPPRI2': 'Temperature of primary mirror [C]', 'TEMPPRI3': 'Temperature of primary mirror [C]', 'TEMPSEC1': 'Temperature of secondary [C]', 'TEMP_OUT': 'Static air temperature outside aircraft [C]', 'TOTTIME': 'Total archiving time [sec]', 'TRACERR': 'Tracking error flag', 'TRACKANG': 'Aircraft track angle [deg]', 'TRACMODE': 'SOFIA tracking mode', 'TRKAOI': 'Tracking AOI', 'TSC-STAT': 'TASCU Status at observation end', 'UTCEND': 'UTC of exposure end', 'UTCSTART': 'UTC of exposure start', 'WAVECENT': 'Central wavelength of observation [um]', 'WVZ_END': 'Water vapor, integrated to zenith, observation start [um]', 'WVZ_STA': 'Water vapor, integrated to zenith, observation start [um]', 'XFPI': 'FPI column for the Position or AOI chop image - coord.pos', 'XPADDING': 'for header size changes', 'YFPI': 'FPI row for the Position or AOI chop image - coord.pos.si', 'ZA_END': 'Telescope zenith angle, observation end [deg]', 'ZA_START': 'Telescope zenith angle, observation start [deg]'}
default_values = {'AOR_ID': '99_9999_9', 'CALMODE': 'UNKNOWN', 'CDELT1': -9999.0, 'CDELT2': -9999.0, 'CMTFILE': 'UNKNOWN', 'COLLROTR': 0.0, 'COLLROTS': 0.0, 'CREATOR': 'SOFSCAN simulation', 'DATAQUAL': 'Nominal', 'DATASRC': 'astro', 'DATATYPE': 'OTHER', 'DEPLOY': 'UNKNOWN', 'DETECTOR': 'HAWC', 'DETSIZE': '64,40', 'DIAG_HZ': -9999.0, 'EQUINOX': 2000.0, 'FBC-STAT': 'FBC_ON', 'FILEGPID': 1, 'FILTER': '-1,-1,-1,-1', 'FLIGHTLG': 9, 'HAWC_VER': 'UNKNOWN', 'HEADSTAT': 'SIMULATED', 'INSTCFG': 'TOTAL_INTENSITY', 'INSTMODE': 'OTFMAP', 'INSTRUME': 'HAWC_PLUS', 'INTCALV': -9999.0, 'KWDICT': 'UNKNOWN', 'MCEMAP': '0,2,1,-1', 'OBSDEC': -9999.0, 'OBSERVER': 'runner', 'OBSRA': -9999.0, 'OBSTYPE': 'object', 'OPERATOR': 'runner', 'ORIGIN': 'SOFSCAN simulation', 'PIXSCAL': -9999.0, 'PLANID': '99_9999', 'PROCSTAT': 'Level_0', 'RPTFILT': 'UNKNOWN', 'RPTPUPIL': 'UNKNOWN', 'SIBS_X': 15.5, 'SIBS_Y': 19.5, 'SMPLFREQ': 203.2520325203252, 'TELCONF': 'NASMYTH', 'TELEQUI': 'j2000', 'TELESCOP': 'SOFIA 2.5m', 'TRACERR': False, 'TRACMODE': 'offset+inertial', 'TRKAOI': 'UNKNOWN', 'TSC-STAT': 'STAB_INERTIAL_ONGOING', 'XFPI': 433.861908, 'YFPI': 447.023258}
sim_keys = {'CHPNOISE', 'DATE-OBS', 'JUMPCHAN', 'JUMPFRMS', 'JUMPSIZE', 'LAT_STA', 'LON_STA', 'OBSDEC', 'OBSRA', 'SCNCONST', 'SCNDNOSC', 'SCNDPER', 'SCNDRAD', 'SPECTEL1', 'SRCAMP', 'SRCS2N', 'SRCSIZE', 'SRCTYPE'}

Methods Documentation

create_basic_hdul(ra='17h45m39.60213s', dec='-29d00m22.0000s', site_longitude='-122.0644d', site_latitude='37.4089d', date_obs='2021-12-06T18:48:25.876', header_options=None)[source]

Create a basic HDU list containing the basic primary header info.

Creates the HDUs containing the necessary information which may be used to create a final data HDU.

Parameters:
rastr or units.Quantity, optional

The right-ascension of the simulated source. The default is the Galactic center.

decstr or units.Quantity, optional

The declination of the simulated source. The default is the Galactic center.

site_longitudestr or units.Quantity, optional

The site longitude of the simulated observation. The default is NASA Ames.

site_latitudestr or units.Quantity, optional

The site latitude of the simulated observation. The default is NASA Ames.

date_obsstr or Time, optional

The date of the simulated observation. String values should be provided in ISOT format in UTC scale.

header_optionsfits.Header or dict, optional

Optional settings to add to the primary header.

Returns:
None
create_configuration_hdu()[source]

Create the configuration HDU for the simulated data.

Defines all bias lines as 5000 for subarrays 0->2.

Returns:
fits.ImageHDU
create_primary_header(ra='17h45m39.60213s', dec='-29d00m22.0000s', site_longitude='-122.0644d', site_latitude='37.4089d', date_obs='2021-12-06T18:48:25.876', header_options=None)[source]

Create a simulated observation primary header.

Parameters:
rastr or units.Quantity, optional

The right-ascension of the observed source.

decstr or units.Quantity, optional

The declination of the observed source.

site_longitudestr or units.Quantity, optional

The site longitude at the start of the observation.

site_latitudestr or units.Quantity, optional

The site latitude at the start of the observation.

date_obsstr, optional

The date-time of the observation in ISOT format, UTC scale at the start of the observation.

header_optionsfits.Header or dict, optional

Optional header keywords for inclusion in the primary header.

Returns:
headerfits.Header
create_simulated_data()[source]

Populate the SQ1Feedback column values for the data HDU.

Returns:
None
create_simulated_hdul(ra='17h45m39.60213s', dec='-29d00m22.0000s', site_longitude='-122.0644d', site_latitude='37.4089d', date_obs='2021-12-06T18:48:25.876', header_options=None)[source]

Create an HDU list containing simulated data.

The simulated HDU list contains the following data:

  • hdul[0] = PrimaryHDU

    data : (0,) float32 header : The primary header

  • hdul[1] = ImageHDU

    data : (1,) int32 header : The MCE configuration. Not used in the reduction.

  • hdul[2] = BinTableHDU

    data : A FITS table containing the data used in the reduction. header : Description of the data in the FITS table.

Parameters:
rastr or units.Quantity, optional

The right-ascension of the simulated source. The default is the Galactic center.

decstr or units.Quantity, optional

The declination of the simulated source. The default is the Galactic center.

site_longitudestr or units.Quantity, optional

The site longitude of the simulated observation. The default is NASA Ames.

site_latitudestr or units.Quantity, optional

The site latitude of the simulated observation. The default is NASA Ames.

date_obsstr or Time, optional

The date of the simulated observation. String values should be provided in ISOT format in UTC scale.

header_optionsfits.Header or dict, optional

Optional settings to add to the primary header.

Returns:
hdulfits.HDUList

A simulated FITS HDU list.

create_simulated_jumps()[source]

Add jumps to the data HDU columns.

Returns:
None
create_source_model()[source]

Create the simulated source model.

Returns:
None
classmethod default_comment(key)[source]

Return the default comment for a given key.

Parameters:
keystr
Returns:
commentstr
default_primary_header(header_options)[source]

Create a default primary header.

Parameters:
header_optionsfits.Header or dict or None

The initial header with which to update and apply any defaults.

Returns:
fits.Header
classmethod default_value(key)[source]

Return the default value for a given key.

Parameters:
keystr

The key for which to retrieve a default value. If ‘all’, then all default values will be returned.

Returns:
valueint or float or str or bool or dict
get_daisy_equatorial()[source]

Return the equatorial offsets for a daisy scan pattern.

Returns:
equatorial_offsetsEquatorialCoordinates
get_data_hdu()[source]

Return a FITS BinTable containing current data.

Returns:
fits.BinTableHDU
static get_hwp_column(utc)[source]

Return the hwpCounts values for the FITS data HDU.

This needs to be updated if hwp is important.

Parameters:
utcnumpy.ndarray (float)

The UTC (unix) times for which to provide HWP values.

Returns:
numpy.ndarray (int)
get_lissajous_equatorial()[source]

Return the equatorial offsets for a Lissajous scan pattern.

Returns:
equatorial_offsetsEquatorialCoordinates
get_location_columns(utc)[source]

Return the LON/LAT values for the FITS data HDU.

Linearly interpolates altitude between the first and last value.

Parameters:
utcnumpy.ndarray (float)

The UTC (unix) times for which to provide location values.

Returns:
locationnumpy.ndarray (float)

The location of SOFIA of shape (2, n_records) with LON in location[0] and LAT in location[1].

static get_los_column(utc)[source]

Return the LOS values for the FITS data HDU.

Linearly interpolates altitude between the first and last value.

Parameters:
utcnumpy.ndarray (float)

The UTC (unix) times for which to provide LOS values.

Returns:
losnumpy.ndarray (float)
get_nonsidereal_columns(utc)[source]

Return the Nonsidereal RA/DEC values for the FITS data HDU.

If a true nonsidereal object is to be simulated, this should be updated.

Parameters:
utcnumpy.ndarray (float)

The UTC (unix) times for which to provide location values.

Returns:
nonsiderealnumpy.ndarray (float)

The nonsidereal coordinates of the object of shape (2, n_records) with RA (hours) in nonsidereal[0] and DEC (degree) in nonsidereal[1].

get_pwv_column(utc)[source]

Return the PWV values for the FITS data HDU.

Linearly interpolates altitude between the first and last value.

Parameters:
utcnumpy.ndarray (float)

The UTC (unix) times for which to provide PWV values.

Returns:
pwvnumpy.ndarray (float)
static get_roll_column(utc)[source]

Return the ROLL values for the FITS data HDU.

Linearly interpolates altitude between the first and last value.

Parameters:
utcnumpy.ndarray (float)

The UTC (unix) times for which to provide ROLL values.

Returns:
rollnumpy.ndarray (float)
initialize_aircraft()[source]

Set the aircraft parameters.

Returns:
None
set_source(ra, dec, header_options=None)[source]

Set the source RA and Dec coordinates.

Parameters:
rastr or units.Quantity
decstr or units.Quantity
header_optionsdict or fits.Header, optional

Optional header options. The OBSRA and OBSDEC keys will override ra and dec if present.

Returns:
None
set_start_site(longitude, latitude, header_options=None)[source]

Set the site longitude and latitude at the start of the observation.

Parameters:
longitudestr or units.Quantity
latitudestr or units.Quantity
header_optionsdict or fits.Header, optional

If provided, the LON_STA and LAT_STA will override longitude and latitude if present.

Returns:
None
set_times(timestamp, header_options=None)[source]

Set the times for the observation.

Parameters:
timestampstr or int or float or Time

The object to convert. If a string is used, it should be in ISOT format in UTC scale. Integers and floats will be parsed as MJD times in the UTC scale.

header_optionsdict or fits.Header, optional

An optional set of keyword values that will override timestamp with the ‘DATE-OBS’ key value if present.

Returns:
None
update_astronomical_columns()[source]

Update the astronomical columns for the FITS data HDU.

Returns:
None
update_chopper()[source]

Add chopper signals to the astronomical positions.

Currently, only CHPAMP1 is used to determine amplitude and 2-point chopping is simulated. CHPNOISE in the header is used to apply random simulated chopper offsets up to a maximum of CHPNOISE arcseconds.

Returns:
None
update_hdul_with_data()[source]

Create the data HDU.

Returns:
None
update_header_band(header)[source]

Update a given header with HAWC band information.

Parameters:
headerfits.Header

The header to update.

Returns:
None
update_header_chopping(header)[source]

Update the chopping configuration in the header.

Parameters:
headerfits.Header
Returns:
None
update_header_daisy(header)[source]

Update the daisy scanning parameters in the header.

Parameters:
headerfits.Header
Returns:
None
update_header_dithering(header)[source]

Update the dithering configuration in the header.

Parameters:
headerfits.Header
Returns:
None
update_header_focus(header)[source]

Update the focus configuration in the header.

Parameters:
headerfits.Header
Returns:
None
update_header_hwp(header)[source]

Update the half-wave-plate configuration in the header.

Parameters:
headerfits.Header
Returns:
None
update_header_lissajous(header)[source]

Update the Lissajous scanning parameters in the header.

Parameters:
headerfits.Header
Returns:
None
update_header_mapping(header)[source]

Update the mapping configuration in the header.

Parameters:
headerfits.Header
Returns:
None
update_header_nodding(header)[source]

Update the nodding configuration in the header.

Parameters:
headerfits.Header
Returns:
None
update_header_origin(header)[source]

Update the origin-like parameters in the header.

Parameters:
headerfits.Header
Returns:
None
update_header_raster(header)[source]

Update the raster scanning parameters in the header.

Parameters:
headerfits.Header
Returns:
None
update_header_scanning(header)[source]

Update the skydip configuration in the header.

Parameters:
headerfits.Header
Returns:
None
update_header_skydip(header)[source]

Update the skydip configuration in the header.

Parameters:
headerfits.Header
Returns:
None
update_header_value(header, key, value)[source]

Update the header with a new value.

Parameters:
headerfits.Header
keystr
valuestr or int or float or bool
Returns:
None
update_header_weather(header)[source]

Update the weather parameters in the header.

Parameters:
headerfits.Header
Returns:
None
update_non_astronomical_columns()[source]

Create column values for the FITS data HDU that are not astronomical.

Returns:
None
update_primary_header_with_data_hdu()[source]

Fill in the missing values in the primary header using data values.

Returns:
None
update_vpa_columns()[source]

Update the VPA columns for the FITS data HDU.

Returns:
None
write_simulated_hdul(filename, ra='17h45m39.60213s', dec='-29d00m22.0000s', site_longitude='-122.0644d', site_latitude='37.4089d', date_obs='2021-12-06T18:48:25.876', overwrite=True, header_options=None)[source]

Write a simulated HDU list to file.

Parameters:
filenamestr

The file path to the output file for which to write the simulated HDU list.

rastr or units.Quantity, optional

The right-ascension of the simulated source. The default is the Galactic center.

decstr or units.Quantity, optional

The declination of the simulated source. The default is the Galactic center.

site_longitudestr or units.Quantity, optional

The site longitude of the simulated observation. The default is NASA Ames.

site_latitudestr or units.Quantity, optional

The site latitude of the simulated observation. The default is NASA Ames.

date_obsstr or Time, optional

The date of the simulated observation. String values should be provided in ISOT format in UTC scale.

overwritebool, optional

If True, allow filename to be overwritten if it already exists.

header_optionsfits.Header or dict, optional

Optional settings to add to the primary header.

Returns:
None