Possible Structures contained in the Exported Savefile.
fsdata_t# Flight Science Data
fsdata_att_t# Attitude data interpolated TO Flight Science TIMES
fsdata_eph_t# ephemeris data interpolated TO Flight Science TIMES
hskdata_t# housekeeping data
hskdata_att_t# Attitude data interpolated TO HouseKeeping TIMES
hskdata_eph_t# ephemeris data interpolated TO HouseKeeping TIMES
adata_t# attitude data
edata_t# ephemeris data
kpdata kp/ap data
dstdata kyoto dst data
amdata ace mag data
asdata ace swepam data
Every structure will have a TIME array associated with it. The TIME array is in units of Modified Julian Date. If no data was available for the start and stop time requested, the TIME array will be filled with 0 and none of the selected variables will appear in the saveset.
In the case of Direct Events, since more than 1 Direct Event can occur per timestamp, the array returned will be sized [N_TIMESTAMP, MAX_DE_PER_TIMESTAMP]. A fill value of -999 is used for times when the number of direct events does not match the maximum direct events possible.
TWINS#_DATA = {
TWINS_IMAGE DOUBLE Array[22, 90]
UNFLIPPED_TWINS_IMAGE DOUBLE Array[44, 45]
IMAGE_MAKING_RECORD STRUCT -> <Anonymous> Array[20]
PIXELSIZE INT 4
TITLE STRING ‘’
ENERGY LONG 0
ALL_ENERGIES INT 1
SW_VERSION STRING '1.0 beta'
CREATION_TIME STRING 'Tue Sep 30 16:44:04 2008'
}
TWINS_IMAGE is an array of values that is the final product of the image_making code. It is sized by [FLOOR(90/PIXELSIZE), 90]. The first index is for polar angle and the second is for actuation angle. If one is looking at the geophysical image, the polar angle runs from ~0º to 90º, where 90º is the center of the image. (If a user chooses 4 degree pixelsize, the elevation angles run from 2-90 degrees in 4 degree steps. If the user chooses 1 degree pixelsize, then the angles will run from 0-90 in 1 degree steps. Basically the max(polar_angle) is always 90 and the minimum is 90-pixelsize*floor(90/pixelsize).) The actuation angle runs from -90 º (at the right of the image), then goes clockwise to 0º, 90º, and then completes a full circle returning to -90º.
UNFLIPPED_TWINS_IMAGE is an array of values that is essentially the step prior to TWINS_IMAGE. It contains data from -90º to 90º in polar angle and from -90º to 90º in actuation angle. In order to create the geophysical image, the array needed to be modified to have a 90º range for polar angle and 360º range for actuation angle.
IMAGE_MAKING_RECORD contains the raw data needed to calculate the fluxes. This structure is complicated, so it is described in Appendix A; essentially it contains a certain number of sweeps. Each sweep is comprised of a full 180º of actuation.
PIXELSIZE is a quantity that the user can select when requesting an image. The pixelsize is defaulted to 4 degrees and represents the bin size in polar angle. The actuation bin size is currently set to 4 degrees and cannot be modified by the user.
TITLE is a string that contains the start and stop times of the image, along with the selected number of sweeps.
ENERGY is set to 0 if the user selects an All Energies image. It is set to # keV if the user selects Differential Energy Flux image at # keV.
ALL_ENERGIES is set to 0 if the user selects a Differential Energy Flux image. It is set to 1 if the user selects an All Energies image.
SW_VERSION is a string to differentiate the different software versions.
CREATION_TIME is a string denoting the time when the image was created.
calsdata_t# calibration science data
calhskdata_t# calibration housekeeping data
chamberdata_t# calibration chamber data
Every structure will have a TIME array associated with it. The TIME array is in units of Modified Julian Date. If no data was available for the start and stop time requested, the TIME array will be filled with 0 and none of the selected variables will appear in the saveset.
In the case of Direct Events, since more than 1 Direct Event can occur per timestamp, the array returned will be sized [N_TIMESTAMP, MAX_DE_PER_TIMESTAMP]. A fill value of -999 is used for times when the number of direct events does not match the maximum direct events possible.
Image record structure:
Field name |
Type |
Units |
Description |
sat_id |
8 bit uint |
None |
Satellite identifier, 0 (TWIN-1) or 1 (TWIN-2) |
telem_mode 1 |
8 bit uint |
None |
Telemetry mode. Modes used are static test, dynamic test, static imaging, dynamic imaging. |
scan_state 2 |
8 bit uint |
None |
Scan (sweep) direction state. Indicates forward or reverse scan. |
Twa_speedselect |
8 bit uint |
None |
Scan Speed Selection as commanded |
scand [45] |
scan data structure |
None |
Array of scan data structures |
Scan data structure:
Field name |
Type |
Units |
Description |
mjd |
double |
days |
Modified Julian Day at start of sector sweep. Epoch (mjd = 0) is 00:00 Nov 17,1858. |
sector 2 |
8 bit uint |
None |
The sweep sector number, 0 <= sector < 45. |
sector_timelapse 2 |
double |
msec |
Sector time lapse, the time the actuator took to move across the sector |
azimuth[5] 2 |
double |
degrees |
position encoder readings at i * 333 ms intervals. Azimuth[0] is the sector start position. This is a combination of fields from the instrument status data, fields “sector start position” and Position at sector start. Azimuth[5] is the sector end position. *NOTE: The azimuth vector numbers are negative versions of the sector_position fields in the instrument status data. |
velocity 2 |
double |
deg/sec |
Velocity at sector start. |
total_starts [2] 3 |
float |
None |
Total start events for each head in this sector |
total_stops [2] 3 |
float |
None |
Total stop events for each head in this sector |
total_valids [2] 3 |
float |
None |
Total valid events for each head in this sector |
satatt_GCI [3] 5 |
double |
Unit Vector |
Spacecraft attitude (0 deg elevation vector), GCI coordinate system. |
Prime_Meridian [3] 5 |
double |
Unit vector |
Spacecraft attitude (0 deg azimuth vector), GCI coordinate system. |
satpos_GCI [3] 4 |
double |
km |
Spacecraft position, GCI coordinate system. |
sunpos_GCI [3] 4 |
double |
km |
Sun position, GCI coordinate system |
earth_field_axis_GCI4 |
double |
nT |
Magnetic Field Vector with respect to GCI coordinate system. |
de [varies] |
direct events structure |
None |
An array of direct events structures |
Direct events structure :
Field name |
Type |
Units |
Description |
head_id 6 |
8 bit uint |
None |
Head detecting the event, 0 <= head <= 1 |
slice 6 |
8 bit uint |
None |
slice number within sector, 0 <= slice < 4, indicating which 1 degree segment within the sector where the event occurred. |
mid_angle 3 |
Float |
Deg |
(Azimuth[slice+1]+Azimuth[slice]/2) |
start_pos 6 |
8 bit uint |
None |
Event start position number, 0 <= start_pos < 64 |
start_height 6 |
8 bit uint |
None |
Start height number, 0 <= start_height < 256 |
stop_pos 6 |
8 bit uint |
None |
Event stop position number, 0 <= stop_pos < 256 |
stop_height 6 |
8 bit uint |
None |
Stop height number, 0 <= stop_height < 128 |
tof 6 |
8 bit uint |
None |
Time-of-flight number, 0 <= tof < 256 |
1 From telemetry secondary header
2 From telemetry instrument status
3 From telemetry singles data
4 From derived ephemeris
5 From spacecraft attitude
6 From telemetry direct events
For every sweep, there is a single IMAGE_MAKING_RECORD structure. Within a multi-sweep saveset, there will be an array of IMAGE_MAKING_RECORD structures. For example if there are 5 sweeps in the saveset, then the total number of Prime_Meridian vectors will be 5*45. The Prime Meridian vector itself has 3 elements (X, Y, and Z.)