Documentation ¶
Index ¶
- Constants
- Variables
- func Interpolate(x float64, xSlice []float64, ySlice []float64) (float64, error)
- type CCDGain
- type CCDGainMode
- type CCDGainTiming
- type CCDImage
- func (ccd *CCDImage) CSVHeaders() []string
- func (ccd *CCDImage) CSVRow() []string
- func (ccd *CCDImage) CSVSpecifications() []string
- func (ccd *CCDImage) FullImageName(prefix string) string
- func (ccd *CCDImage) Image(buf []byte) *image.Gray16
- func (ccd *CCDImage) MarshalJSON() ([]byte, error)
- func (ccd *CCDImage) SetParquet(row *parquetrow.ParquetRow, buffer []byte)
- type CCDImagePackData
- type CPRU
- type CPRUReport
- type ErrXTooLarge
- type ErrXTooSmall
- type HTR
- type HTRReport
- type NCBin
- type PMData
- type PWR
- type PWRReport
- type RID
- type SID
- type STAT
- type TCAcceptFailureData
- type TCAcceptSuccessData
- type TCExecFailureData
- type TCExecSuccessData
- type WDWMode
- type Wdw
Constants ¶
const JPEGQUncompressed16bit = uint8(101)
JPEGQUncompressed16bit is the value for non-12bit image data
const NCOLStartOffset uint16 = 1
NCOLStartOffset says how many more columns than reported the actual columns are
Variables ¶
var GpsTime time.Time = time.Date(1980, time.January, 6, 0, 0, gpsTimeCorrection, 0, time.UTC)
GpsTime is the start of GPS Epoch
var Specification string = "AEZICD002:I"
Specification describes what version the current implementation follows
Functions ¶
Types ¶
type CCDGain ¶
type CCDGain uint16
CCDGain is gain composite information
func (*CCDGain) Mode ¶
func (gain *CCDGain) Mode() CCDGainMode
Mode returns high/low signal mode, Bit[12]
func (*CCDGain) Timing ¶
func (gain *CCDGain) Timing() CCDGainTiming
Timing returns the full timing flag, Bit[8]
func (*CCDGain) Truncation ¶
Truncation returns number of bits to be truncated (digital gain), Bit[3..0]
type CCDGainMode ¶
type CCDGainMode int
CCDGainMode is high/low signal mode
const ( HighSignalMode CCDGainMode = iota LowSignalMode )
HighSignalMode, LowSignalMode
func (*CCDGainMode) String ¶ added in v0.1.0
func (mode *CCDGainMode) String() string
type CCDGainTiming ¶
type CCDGainTiming int
CCDGainTiming is the timing flag
const ( // FasterTiming used for binned and discarded pixels FasterTiming CCDGainTiming = iota // FullTiming used even for pixels that are not read out FullTiming )
func (*CCDGainTiming) String ¶ added in v0.1.0
func (timing *CCDGainTiming) String() string
type CCDImage ¶
type CCDImage struct { PackData *CCDImagePackData BadColumns []uint16 ImageFileName string }
CCDImage is a container for the invariant CCDImagePackData header and the variable BadColumns that follow
func NewCCDImage ¶ added in v0.2.1
NewCCDImage reads buf into a complete CCDImage
func (*CCDImage) CSVHeaders ¶
CSVHeaders returns the exportable field names
func (*CCDImage) CSVSpecifications ¶
CSVSpecifications returns the specs used in creating the struct
func (*CCDImage) FullImageName ¶ added in v0.2.2
FullImageName returns the full image filename for a given prefix
func (*CCDImage) Image ¶ added in v0.2.0
Image returns the 16bit gray image and the name of the file/bucket object
func (*CCDImage) MarshalJSON ¶ added in v0.1.0
MarshalJSON jsonifies content
func (*CCDImage) SetParquet ¶ added in v1.0.0
func (ccd *CCDImage) SetParquet(row *parquetrow.ParquetRow, buffer []byte)
SetParquet sets the parquet representation of the CCDImage
type CCDImagePackData ¶
type CCDImagePackData struct { CCDSEL uint8 // CCD sensor number, not same format for TM and TC EXPTS uint32 // Exposure start time, seconds (CUC time format) EXPTSS uint16 // Exposure start time, subseconds (CUC time format) WDW Wdw // Window mode WDWOV uint16 // Bit window overflow counter (should be zero when WDW is automatic) JPEGQ uint8 // JPEG compression quality setting (0..100) FRAME uint16 // Frame count since boot NROW uint16 // Number of rows in image 1..511 NRBIN uint16 // Number of rows to bin together 0..63 NRSKIP uint16 // Number of rows to skip before start of readout 0..511 NCOL uint16 // Number of columns in image (starts at 0) 0..2047 NCBIN NCBin // Number of columns to bin in FPGA (power of two) Bit[11..8], CCD Bit[7..0] NCSKIP uint16 // Numbers of columns to skip before start of readout NFLUSH uint16 // Number of pre-exposure flushes TEXPMS uint32 // Exposure time in milliseconds GAIN CCDGain // Gain composite information TEMP uint16 // Temperature of the ADC FBINOV uint16 // Number of overflows detected while binning 0..32767 LBLNK uint16 // Value of leading blanks. Average of blank pixesl 32:47 from the middle row of the readout region TBLNK uint16 // Value of trailing blanks. Average of blank pixels 2128:2143 (50 leading blank + 2048 pxiels + 50 trailing blanks) from the middle row of the readout region ZERO uint16 // Value of zero input reading TIMING1 uint16 // Clock timing parameters, Bit[15..0]. Alternates with frame count between *1rt and *2rt timings TIMING2 uint16 // Clock timing parameters, Bit[31..16]. Alternates with frame count between *1rt and *2rt timings VERSION uint16 // Readout of firmware version TIMING3 uint16 // Clock timing parameters, Bit[47..32]. Alternates with frame count between *1rt and *2rt timings NBC uint16 // Number of bad columns set }
CCDImagePackData contains the composite information from the CCD and the CRB module
func NewCCDImagePackData ¶ added in v0.2.1
func NewCCDImagePackData(buf io.Reader) (*CCDImagePackData, error)
NewCCDImagePackData reads buf into CCDImagePackData
func (*CCDImagePackData) CSVHeaders ¶ added in v0.1.0
func (ccd *CCDImagePackData) CSVHeaders() []string
CSVHeaders returns the exportable field names
func (*CCDImagePackData) CSVRow ¶ added in v0.1.0
func (ccd *CCDImagePackData) CSVRow() []string
CSVRow returns the exportable field values
func (*CCDImagePackData) Nanoseconds ¶
func (ccd *CCDImagePackData) Nanoseconds() int64
Nanoseconds returns the measurement time in nanoseconds since epoch
func (*CCDImagePackData) SetParquet ¶ added in v1.0.0
func (ccd *CCDImagePackData) SetParquet(row *parquetrow.ParquetRow)
SetParquet sets the parquet representation of the CCDImagePackData
type CPRU ¶
type CPRU struct { STAT cpruStat // CPRU/CRB power status // CCD overvoltage fault, one bit per CCD. Bit [7..4] // CCD power enabled, one bit per CCD. Bit [3..0] VGATE0 gate // CCD0 Gate Voltage 0..4095 VSUBS0 subs // CCD0 Substrate Voltage 0..4095 VRD0 rd // CCD0 Reset transistor Drain Voltage 0..4095 VOD0 od // CCD0 Output Drain Voltage 0..4095 VGATE1 gate // CCD1 Gate Voltage 0..4095 VSUBS1 subs // CCD1 Substrate Voltage 0..4095 VRD1 rd // CCD1 Reset transistor Drain Voltage 0..4095 VOD1 od // CCD1 Output Drain Voltage 0..4095 VGATE2 gate // CCD2 Gate Voltage 0..4095 VSUBS2 subs // CCD2 Substrate Voltage 0..4095 VRD2 rd // CCD2 Reset transistor Drain Voltage 0..4095 VOD2 od // CCD2 Output Drain Voltage 0..4095 VGATE3 gate // CCD3 Gate Voltage 0..4095 VSUBS3 subs // CCD3 Substrate Voltage 0..4095 VRD3 rd // CCD3 Reset transistor Drain Voltage 0..4095 VOD3 od // CCD3 Output Drain Voltage 0..4095 }
CPRU structure
func (*CPRU) CSVHeaders ¶
CSVHeaders returns the field names
func (*CPRU) CSVSpecifications ¶
CSVSpecifications returns the specs used in creating the struct
func (*CPRU) Report ¶
func (cpru *CPRU) Report() CPRUReport
Report transforms CPRU data to useful units
func (*CPRU) SetParquet ¶ added in v1.0.0
func (cpru *CPRU) SetParquet(row *parquetrow.ParquetRow)
SetParquet sets the parquet representation of the CPRU
type CPRUReport ¶
type CPRUReport struct { VGATE0 float64 // CCD0 Gate Voltage VSUBS0 float64 // CCD0 Substrate Voltage VRD0 float64 // CCD0 Reset transistor Drain Voltage VOD0 float64 // CCD0 Output Drain Voltage Overvoltage0 bool // CCD0 overvoltage fault Power0 bool // CCD0 overvoltage fault VGATE1 float64 // CCD1 Gate Voltage VSUBS1 float64 // CCD1 Substrate Voltage VRD1 float64 // CCD1 Reset transistor Drain Voltage VOD1 float64 // CCD1 Output Drain Voltage Overvoltage1 bool // CCD1 overvoltage fault Power1 bool // CCD1 overvoltage fault VGATE2 float64 // CCD2 Gate Voltage VSUBS2 float64 // CCD2 Substrate Voltage VRD2 float64 // CCD2 Reset transistor Drain Voltage VOD2 float64 // CCD2 Output Drain Voltage Overvoltage2 bool // CCD2 overvoltage fault Power2 bool // CCD2 overvoltage fault VGATE3 float64 // CCD3 Gate Voltage VSUBS3 float64 // CCD3 Substrate Voltage VRD3 float64 // CCD3 Reset transistor Drain Voltage VOD3 float64 // CCD3 Output Drain Voltage Overvoltage3 bool // CCD3 overvoltage fault Power3 bool // CCD3 overvoltage fault }
CPRUReport structure
type ErrXTooLarge ¶
type ErrXTooLarge float64
ErrXTooLarge x value sent to interpolator is too large
func (ErrXTooLarge) Error ¶
func (err ErrXTooLarge) Error() string
func (ErrXTooLarge) String ¶
func (err ErrXTooLarge) String() string
type ErrXTooSmall ¶
type ErrXTooSmall float64
ErrXTooSmall value sent to interpolator is too small
func (ErrXTooSmall) Error ¶
func (err ErrXTooSmall) Error() string
func (ErrXTooSmall) String ¶
func (err ErrXTooSmall) String() string
type HTR ¶
type HTR struct { HTR1A htr // Heater 1 Temperature sense A 0..4095 HTR1B htr // Heater 1 Temperature sense B 0..4095 HTR1OD htr // Heater 1 Output Drive setting 0..4095 HTR2A htr HTR2B htr HTR2OD htr HTR7A htr HTR7B htr HTR7OD htr HTR8A htr HTR8B htr HTR8OD htr }
HTR housekeeping report returns data on all heater regulators.
func (*HTR) CSVSpecifications ¶
CSVSpecifications returns the specs used in creating the struct
func (*HTR) SetParquet ¶ added in v1.0.0
func (htr *HTR) SetParquet(row *parquetrow.ParquetRow)
SetParquet sets the parquet representation of the HTR
type HTRReport ¶
type HTRReport struct { HTR1A float64 // Heater 1 Temperature sense A ⁰C HTR1B float64 // Heater 1 Temperature sense B ⁰C HTR1OD float64 // Heater 1 Output Drive setting voltage HTR2A float64 HTR2B float64 HTR2OD float64 HTR7A float64 HTR7B float64 HTR7OD float64 HTR8A float64 HTR8B float64 HTR8OD float64 Warnings []error }
HTRReport housekeeping report returns data on all heater regulators in useful units.
type NCBin ¶
type NCBin uint16
NCBin contains the FPGA and CCD columns bin count
func (*NCBin) CCDColumns ¶
CCDColumns returns number of CCD columns to bin, Bit[7..0]
func (*NCBin) FPGAColumns ¶
FPGAColumns returns number of FPGA columns to bin, Bit[11..8]
The value is encoded as 2^x
type PMData ¶
type PMData struct { EXPTS uint32 // Exposure start time, seconds (CUC time format) EXPTSS uint16 // Exposure start time, subseconds (CUC time format) PM1A uint32 // Photometer 1, thermistor input A sum PM1ACNTR uint32 // Photometer 1, thermistor input A counter PM1B uint32 // Photometer 1, thermistor input B sum PM1BCNTR uint32 // Photometer 1, thermistor input B counter PM1S uint32 // Photometer 1, photo diode input SIG sum PM1SCNTR uint32 // Photometer 1, photo diode input SIG counter PM2A uint32 // Photometer 2, thermistor input A sum PM2ACNTR uint32 // Photometer 2, thermistor input A counter PM2B uint32 // Photometer 2, thermistor input B sum PM2BCNTR uint32 // Photometer 2, thermistor input B counter PM2S uint32 // Photometer 2, photo diode input SIG sum PM2SCNTR uint32 // Photometer 2, photo diode input SIG counter }
PMData data from photometers
func (*PMData) CSVHeaders ¶
CSVHeaders returns the header row
func (*PMData) CSVSpecifications ¶
CSVSpecifications returns the version of the spec used
func (*PMData) Nanoseconds ¶
Nanoseconds returns the measurement time in nanoseconds since epoch
func (*PMData) SetParquet ¶ added in v1.0.0
func (pm *PMData) SetParquet(row *parquetrow.ParquetRow)
SetParquet sets the parquet representation of the PMData
type PWR ¶
type PWR struct { PWRT pwrt // Temp. sense 0..4095 PWRP32V pwrp32v // +32V voltage sense 0..4095 PWRP32C pwrp32c // +32V current sense 0..4095 PWRP16V pwrp16v // +16V voltage sense 0..4095 PWRP16C pwrp16c // +16V current sense 0..4095 PWRM16V pwrm16v // -16V voltage sense 0..4095 PWRM16C pwrm16c // -16V current sense 0..4095 PWRP3V3 pwrp3v3 // +3V3 voltage sense 0..4095 PWRP3C3 pwrp3c3 // +3V3 current sense 0..4095 }
PWR structure 18 octext
func (*PWR) CSVSpecifications ¶
CSVSpecifications returns the specs used in creating the struct
func (*PWR) SetParquet ¶ added in v1.0.0
func (pwr *PWR) SetParquet(row *parquetrow.ParquetRow)
SetParquet setsthe parquet representation of the PWR
type PWRReport ¶
type PWRReport struct { PWRT float64 // Temp. sense ⁰C PWRP32V float64 // +32V voltage sense voltage PWRP32C float64 // +32V current sense current PWRP16V float64 // +16V voltage sense voltage PWRP16C float64 // +16V current sense current PWRM16V float64 // -16V voltage sense voltage PWRM16C float64 // -16V current sense current PWRP3V3 float64 // +3V3 voltage sense voltage PWRP3C3 float64 // +3V3 current sense current Warnings []error }
PWRReport structure in useful units
type RID ¶
type RID uint16
RID is Report Identification
const ( // CCD1 is connected to CPRUA port 0 CCD1 RID = 21 // CCD2 is connected to CPRUA port 1 CCD2 RID = 22 // CCD3 is connected to CPRUA port 2 CCD3 RID = 23 // CCD4 is connected to CPRUA port 3 CCD4 RID = 24 // CCD5 is connected to CPRUB port 0 CCD5 RID = 25 // CCD6 is connected to CPRUB port 1 CCD6 RID = 26 // CCD7 is connected to CPRUB port 2 CCD7 RID = 27 // PM is Photometer data PM RID = 30 )
func (*RID) CCDNumber ¶ added in v0.2.2
CCDNumber returns the ccd number, not the rid value for ccds
func (*RID) MarshalJSON ¶
MarshalJSON makes a custom json of what is of interest in the struct
type SID ¶
type SID uint16
SID is the id of a single housekeeping parameter
func (*SID) MarshalJSON ¶
MarshalJSON makes a custom json of what is of interest in the struct
type STAT ¶
type STAT struct { SPID uint16 // Software Part ID SPREV uint8 // Software Part Revision FPID uint16 // Firmware Part ID FPREV uint8 // Firmware Part Revision SVNA uint8 // SVN revision tag on format A.B.C SVNB uint8 // SVN revision tag on format A.B.C SVNC uint8 // SVN revision tag on format A.B.C TS uint32 // Time, seconds (CUC time format) TSS uint16 // Time, subseconds (CUC time format) MODE uint8 // Payload mode 1..2 EDACE uint32 // EDAC detected single bit errors EDACCE uint32 // EDAC corrected single bit errors EDACN uint32 // EDAC memory scrubber passes through memory SPWEOP uint32 // SpaceWire received EOPs SPWEEP uint32 // SpaceWire received EEPs ANOMALY uint8 // Anomalyflag (0==0 ? OK: payload power off) }
STAT General status housekeeping report of the payload instrument.
func (STAT) CSVSpecifications ¶
CSVSpecifications returns the version of the spec used
func (*STAT) Nanoseconds ¶
Nanoseconds returns the measurement time in nanoseconds since epoch
func (*STAT) SetParquet ¶ added in v1.0.0
func (stat *STAT) SetParquet(row *parquetrow.ParquetRow)
STATParquet holds the parquet representation of the STAT SetParquet sets the parquet representation of the STAT
type TCAcceptFailureData ¶ added in v0.1.0
type TCAcceptFailureData struct { TCPID uint16 // TCPID is a copy of the Packet ID header field of the TC PSC uint16 // PSC is a copy of the Sequence Control Header field of the TC ErrorCode uint8 // Error code }
TCAcceptFailureData Telecommand Acceptance Report - Failure
func NewTCAcceptFailureData ¶ added in v0.2.1
func NewTCAcceptFailureData(buf io.Reader) (*TCAcceptFailureData, error)
NewTCAcceptFailureData reads a TCAcceptFailureData from buffer
func (*TCAcceptFailureData) CSVHeaders ¶ added in v0.1.0
func (tcv *TCAcceptFailureData) CSVHeaders() []string
CSVHeaders returns the header row
func (*TCAcceptFailureData) CSVRow ¶ added in v0.1.0
func (tcv *TCAcceptFailureData) CSVRow() []string
CSVRow returns the data row
func (*TCAcceptFailureData) CSVSpecifications ¶ added in v0.1.0
func (tcv *TCAcceptFailureData) CSVSpecifications() []string
CSVSpecifications returns the version of the spec used
func (*TCAcceptFailureData) SetParquet ¶ added in v1.0.0
func (tcv *TCAcceptFailureData) SetParquet(row *parquetrow.ParquetRow)
SetParquet sets the parquet representation of the TCV
type TCAcceptSuccessData ¶ added in v0.1.0
type TCAcceptSuccessData struct { TCPID uint16 // TCPID is a copy of the Packet ID header field of the TC PSC uint16 // PSC is a copy of the Sequence Control Header field of the TC }
TCAcceptSuccessData Telecommand Acceptance Report - Success
func NewTCAcceptSuccessData ¶ added in v0.2.1
func NewTCAcceptSuccessData(buf io.Reader) (*TCAcceptSuccessData, error)
NewTCAcceptSuccessData reads a TCAcceptSuccessData from buffer
func (*TCAcceptSuccessData) CSVHeaders ¶ added in v0.1.0
func (tcv *TCAcceptSuccessData) CSVHeaders() []string
CSVHeaders returns the header row
func (*TCAcceptSuccessData) CSVRow ¶ added in v0.1.0
func (tcv *TCAcceptSuccessData) CSVRow() []string
CSVRow returns the data row
func (*TCAcceptSuccessData) CSVSpecifications ¶ added in v0.1.0
func (tcv *TCAcceptSuccessData) CSVSpecifications() []string
CSVSpecifications returns the version of the spec used
func (*TCAcceptSuccessData) SetParquet ¶ added in v1.0.0
func (tcv *TCAcceptSuccessData) SetParquet(row *parquetrow.ParquetRow)
SetParquet sets the parquet representation of the TCV
type TCExecFailureData ¶ added in v0.1.0
type TCExecFailureData struct { TCPID uint16 // TCPID is a copy of the Packet ID header field of the TC PSC uint16 // PSC is a copy of the Sequence Control Header field of the TC ErrorCode uint8 // Error code }
TCExecFailureData Telecommand Execution Report - Failure
func NewTCExecFailureData ¶ added in v0.2.1
func NewTCExecFailureData(buf io.Reader) (*TCExecFailureData, error)
NewTCExecFailureData reads a TCExecFailureData from buffer
func (*TCExecFailureData) CSVHeaders ¶ added in v0.1.0
func (tcv *TCExecFailureData) CSVHeaders() []string
CSVHeaders returns the header row
func (*TCExecFailureData) CSVRow ¶ added in v0.1.0
func (tcv *TCExecFailureData) CSVRow() []string
CSVRow returns the data row
func (*TCExecFailureData) CSVSpecifications ¶ added in v0.1.0
func (tcv *TCExecFailureData) CSVSpecifications() []string
CSVSpecifications returns the version of the spec used
func (*TCExecFailureData) SetParquet ¶ added in v1.0.0
func (tcv *TCExecFailureData) SetParquet(row *parquetrow.ParquetRow)
SetParquet sets the parquet representation of the TCV
type TCExecSuccessData ¶ added in v0.1.0
type TCExecSuccessData struct { TCPID uint16 // TCPID is a copy of the Packet ID header field of the TC PSC uint16 // PSC is a copy of the Sequence Control Header field of the TC }
TCExecSuccessData Telecommand Execution Report - Success
func NewTCExecSuccessData ¶ added in v0.2.1
func NewTCExecSuccessData(buf io.Reader) (*TCExecSuccessData, error)
NewTCExecSuccessData reads a TCExecSuccessData from buffer
func (*TCExecSuccessData) CSVHeaders ¶ added in v0.1.0
func (tcv *TCExecSuccessData) CSVHeaders() []string
CSVHeaders returns the header row
func (*TCExecSuccessData) CSVRow ¶ added in v0.1.0
func (tcv *TCExecSuccessData) CSVRow() []string
CSVRow returns the data row
func (*TCExecSuccessData) CSVSpecifications ¶ added in v0.1.0
func (tcv *TCExecSuccessData) CSVSpecifications() []string
CSVSpecifications returns the version of the spec used
func (*TCExecSuccessData) SetParquet ¶ added in v1.0.0
func (tcv *TCExecSuccessData) SetParquet(row *parquetrow.ParquetRow)
SetParquet sets the parquet representation of the TCV
type Wdw ¶
type Wdw uint8
Wdw is the composite status of Image Window Mode
func (*Wdw) InputDataWindow ¶
InputDataWindow returns which bits out of the depth of the CCD Images
It ueses information in Bit[2..0]
Returns major and minor bit of original CCD Image and error if encoding not covered by specification.
If full range of Bit[15..0] is used the JPEGQ should be 0xFF