LissajousDither¶
- class marxs.missions.chandra.LissajousDither(**kwargs)[source]¶
Bases:
FixedPointingLissajous dither pattern with adjustable parameters.
Parameters¶
- DitherAmp
astropy.units.Quantity (pitch, yaw, roll) dither amplitude
- DitherPeriod
astropy.units.Quantity (pitch, yaw, roll) dither Period in sec
- DitherPhase
astropy.units.Quantity (pitch, yaw, roll) dither phase at
time = 0in radian
Define a new MARXS element.
Methods Summary
dither(time)Calculate the dither offset relative to pointing direction.
photons_dir(coos, time)Calculate direction on photons in homogeneous coordinates.
pointing(time)Calculate the pointing direction for a set of times There are the steps to convert the dither (which are offsets) to the total pointing direction with the roll properly taken care of.
write_asol(photons, asolfile[, timestep])Write an aspect solution (asol) file
Methods Documentation
- dither(time)[source]¶
Calculate the dither offset relative to pointing direction.
Parameters¶
- timenp.array
Time when the dither motion should be calculated
Returns¶
- deltanp.array of shape (N, 3)
dither motion offset in pitch, yaw, roll for N times in rad
- photons_dir(coos, time)[source]¶
Calculate direction on photons in homogeneous coordinates.
Parameters¶
- coos
astropy.coordiantes.SkyCoord Origin of each photon on the sky
- timenp.array
Time for each photons in sec
Returns¶
- photons_dirnp.array of shape (n, 4)
Homogeneous direction vector for each photon
- coos
- pointing(time)[source]¶
Calculate the pointing direction for a set of times There are the steps to convert the dither (which are offsets) to the total pointing direction with the roll properly taken care of. (See marxasp.c in the marx code for more details.) 1. Convert ra/dec offsets to absolute pointing. 2. Roll resulting vector about nominal pointing 3. Convert result to ra/dec.
Parameters¶
- timenp.array
Array of times
Returns¶
- pointing(n, 3) np.array
Ra, Dec, roll values in radian for the pointing direction at time t.
- write_asol(photons, asolfile, timestep=0.256)[source]¶
Write an aspect solution (asol) file
Chandra analysis scripts often require an aspect solution, which is essientially a list of pointing directions in the dither pattern vs. time. This method write such a list to a file.
Parameters¶
- photons
astropy.table.Tableorastropy.table.Row Table with photon properties. Some meta data from the header of this table is required (e.g. the length of the observation).
- asolfilestring
Path and file name where the asol file is saved.
- timestampfloat
Time step between entries in the asol file in seconds.
- photons
- DitherAmp