chandra_aca.drift

Function(s) related to ACA alignment.

In particular compute the dynamical pointing offset required to achieve a desired zero-offset target aimpoint.

A key element of this module is the fitting analysis here: https://github.com/sot/aimpoint_mon/blob/master/fit_aimpoint_drift-2018-11.ipynb

class chandra_aca.drift.AcaDriftModel(scale, offset, trend, jumps, year0)[source]

AcaDriftModel class

Define a drift model for aspect solution SIM DY/DZ values as a function of time and ACA CCD temperature. This expresses the model which is defined and fitted in the fit_aimpoint_drift notebook in this repo.

calc(times, t_ccd)[source]

Calculate the drift model

Calculate the drift model for aspect solution SIM DY/DZ values for input times and t_ccd. The two arrays are broadcasted to match.

The returned drifts are in arcsec and provide the expected aspect solution SIM DY or DZ values in arcsec. This can be converted to a drift in mm (corresponding to units in an ASOL file) via the scale factor 20.493 arcsec/mm.

Parameters:
times

array of times (CXC secs)

t_ccd

CCD temperatures (degC)

Returns:
array of ASOL SIM DY/DZ (arcsec)
chandra_aca.drift.get_aca_offsets(detector, chip_id, chipx, chipy, time, t_ccd)[source]

Compute the dynamical ACA offset values for the provided inputs.

The time and t_ccd inputs can be either scalars or arrays.

Parameters:
detector

one of ACIS-I, ACIS-S, HRC-I, HRC-S

chipx

zero-offset aimpoint CHIPX

chipy

zero-offset aimpoint CHIPY

chip_id

zero-offset aimpoint CHIP ID

time

time(s) of observation (any Chandra.Time compatible format)

t_ccd

ACA CCD temperature(s) (degC)

Returns:
aca_offset_y, aca_offset_z (arcsec)
chandra_aca.drift.get_default_zero_offset_table()[source]

Get official SOT MP zero offset aimpoint table.

First try /data/mpcrit1/aimpoint_table/zero_offset_aimpoints.txt. If that is not available use: https://cxc.harvard.edu/mta/ASPECT/drift/zero_offset_aimpoints.txt. The web version is updated weekly on Sunday via a Ska cron job.

Note the definitive source of this file is: https://icxc.harvard.edu/mp/html/aimpoint_table/zero_offset_aimpoints.txt.

Returns:
zero offset aimpoint table as astropy.Table
chandra_aca.drift.get_fid_offset(time, t_ccd)[source]

Compute the fid light offset values for a given time and temperature.

The time and t_ccd inputs can be either scalars or arrays.

Parameters:
timeCxoTimeLike format

Time for offset calculation.

t_ccdfloat

ACA CCD temperature in degrees Celsius.

Returns:
tuple

A tuple containing the y-angle and z-angle offsets (in arcseconds) to apply additively to the nominal (FEB07) fid positions.

Notes

The apparent fid light positions change in accordance with the ACA alignment drift as a function of time and temperature. This is captured in the ACA aimpoint drift model. This function uses that model to provide the offsets in y-angle and z-angle (arcsec) to apply additively to the nominal fid positions.

The y_offset and z_offset values in this function were calibrated using the 2022-11 aimpoint drift model and the FEB07 fid characteristics. See https://github.com/sot/fid_drift_mon/blob/master/fid_offset_coeff.ipynb

chandra_aca.drift.get_target_aimpoint(date, cycle, detector, too=False, zero_offset_table=None)[source]

Given date, proposal cycle, and detector, return aimpoint chipx, chipy, chip_id

Parameters:
date

observation date

cycle

proposal cycle of observation

detector

target detector

too

boolean. If target is TOO use current cycle not proposal cycle.

zero_offset_abletable (astropy or numpy) of zero offset aimpoint table

defaults to official SOT MP version if not supplied.

Returns:
tuple of chipx, chipy, chip_id