Table of Contents Previous Chapter ACIS

37.0 Science Data Processing Classes (36-53228 B)

37.1 Purpose

The purpose of the Science Processing classes is to implement the detailed science data processing requirements of the Back End Processor. The overall control of the data processing is managed by the Science Management Classes, described in Section 33.0.

37.2 Uses

The following lists the uses of the Science Processing classes:

  1. Timed Exposure Raw Mode Data Processing

  2. Timed Exposure Histogram Mode Data Processing

  3. Timed Exposure Faint Mode 3x3 Event Data Processing

  4. Timed Exposure Faint Mode 3x3 with Bias Data Processing

  5. Timed Exposure Graded Mode Data Processing

  6. Continuous Clocking Raw Mode Data Processing

  7. Continuous Clocking Faint Mode 1x3 Event Data Processing

  8. Continuous Clocking Graded Mode Data Processing

37.3 Organization

This section describes the class hierarchy and relationships between the various pieces of the science processing system. Given the large number of relationships between the various processing classes, this section is divided into subsections. Each subsection describes a portion of the system, focusing on a particular group of relationships. The first subsection establishes the abstract processing mode base class definitions, and the data filter class definitions. The second subsection describes the leaf processing mode classes, each of which is responsible for handling a single science data processing mode. The third subsection describes the data representation classes used within the system, and the last subsection describes how the Science Mode classes, SmTimedExposure and SmContClocking, relate to the processing mode classes.

37.3.1 Process Mode Base Classes

Figure 176 illustrates the class relationships of the processing mode base classes.

FIGURE 176. Processing Mode Base Class Relationships


ScienceMode - This class is an abstract base class representing a main science mode. It contains an array of pointers to ProcessMode instances, one pointer for each Front End Processor (FEP) in the instrument, and uses the ProcessMode instances to handle data produced by a given FEP. The ProcessMode class, in turn, contains a pointer back to a ScienceMode instance. ProcessMode uses the ScienceMode to wait for telemetry packet buffers to use when sending CCD science data and exposure records (waitForPkt). See Section 33.0 for a detailed description of the ScienceMode class. See Section 37.3.4 for descriptions of the specific science modes supported by the instrument.

ProcessMode - This class is an abstract class responsible for processing science data being emitted by a single Front End Processor. This abstract class implements functions common to all science processing modes, and defines interfaces required by all such modes. This class is described in detail in Section 33.0.

EventExposure - This class is responsible for maintaining science run and exposure information needed for data processing. It provides functions which store and retrieve the science run's row and column scale factors, the row offset, and the output node configuration used by images produced by a FEP (setGeometry, getGeometry). It has functions to set and get the split threshold levels configured for the science run (setSplitThreshold, getSplitThreshold). This class provides utility functions which use the reported run information, such as map a clocked pixel position into absolute CCD coordinates (mapPosition), and determine from which CCD quadrant a pixel was produced (getQuadrant). This class obtains its exposure information from records produced by a Front End Processor, FEPexpRec and FEPexpEndRec (copyExpStart, copyExpEnd). The extracted information is used to provide clients with the last reported exposure number (getExposureNumber), the reported overclock base values and delta values (getOverclockBase, getOverclockDelta), and the number of pixels detected by the FEP which were above their threshold levels (getThresholdCnt). Refer to Section 4.10 for a description of the FEPexpRec and FEPexpEndRec structure definitions.

PmHist - This class is a subclass of ProcessMode, and is responsible for processing histogram data produced by a given Front End Processor. This class provides functions which configure and query which video chains (quadrants) are being histogrammed (setQuadMode, getQuadMode), and which process FEP to BEP records (processRecord). It also defines an abstract function which subclasses must re-define to complete the current exposure (finishExposure).

PmRaw - This class is a subclass of ProcessMode, and is responsible for processing raw pixel data produced by a given Front End Processor. This class contains a reference to a FilterWindow class instance, which it uses to clip raw images produced by the FEP. This class provides functions which set and retrieve the compression table code (setCompression, getCompression), which set and query the number of overclock pixels in each raw row of data (setOverclockCnt, getOverclockCnt), which install a the window list to use for clipping the raw data (setWindowFilter), and which interpret data records produced by a FEP (processRecord). It also provides member functions used by its child classes to accumulate a series of FEP to BEP ring-buffer records into a single FEP to BEP record (accumulateRawRecord), retrieve a pointer to the accumulated record (getRawRecord), run the raw row through the window clipping filter (filterRow), and pack the unclipped regions of the row into an output buffer (packRow). It also defines an abstract function which subclasses must re-define to complete the current exposure (finishExposure).

PmEvent - This class is a subclass of ProcessMode, and is responsible for filtering candidate events produced by a given Front End Processor, for processing bias map errors reported by a FEP, and for processing FEP-supplied event-mode exposure record information. This class contains three filter references. The FilterWindow instance is used to filter events based on their position within the CCD image. The FilterGrade instance is used to filter events based on the spatial distribution of pulse heights within the pixels representing the event. The FilterPh instance is used to filter events based on their pulse height. The PmEvent class provides functions which are used during setup to establish the pointers to these filters (setWindowFilter, setGradeFilter, setPhFilter). It provides functions which interpret data records produced by a FEP (processRecord), and process bias error records (digestBiasError). It also provides functions used by its child classes to setup exposure record packets (setupExposureRecord). It also provides functions which filter out events using its event filters (filterEvent), and increment an accepted event counter (incEventCnt). Finally, this class defines a function which is invoked at the end of a run (endRun), an abstract function which completes a current exposure (finishExposure), which all child classes must implement.

Filter - This class represents a CCD science data filter. It provides functions which track the number of data elements accepted and rejected by a given instance (accept, reject). It also provides functions that clients use to retrieve and reset this information (getAcceptCnt, getDiscardCnt, resetCounters).

FilterWindow - This class is a subclass of Filter, and represents a collection of two dimensional windowing filters. Each window in the collection selects or rejects events or raw pixels based on their position within a CCD. It provides functions to add a window and to remove all windows (addWindow, resetWindows), to filter a row of raw pixel data (filterRow), and to filter a candidate CCD event (filterEvent).

FilterGrade - This class is a subclass of Filter, and is responsible for filtering events based on their grade code. The grade code of an event represents the spatial pattern of pulse height distributions among the pixels associated with the event. This class provides functions to reject all events (disableAll), and to add specific event grades to accept (allow). This class also provides a member function which selects or rejects an event based on its grade (filterEvent).

FilterPh - This class is a subclass of Filter, and is responsible for accepting or rejecting events based on their pulse height. This class provides functions to set the pulse height limits of the filter (setLimits), to accept events whose pulse heights are within this range, and to reject those outside the configured limits (filterEvent).

FEPexpRec - This is a data structure defined by the Front End to Back End interface. This structure contains exposure information, such as the current exposure number, and the overclock levels being used for the current exposure. See Section 4.10 for a detailed description of the FEP to BEP science interface.

FEPexpEndRec -This is a data structure defined by the Front End to Back End interface. This structure contains information pertaining to the exposure which has just completed, such as the number of pixels detected above their respective threshold level. See Section 4.10.

FEPerrRec - This is a data structure defined by the FEP to BEP interface. This structure reports the detection of one or two parity errors in the FEP's pixel bias map, and specifies which image pixels are affected. For more detail, see Section 4.10.

Tf_Data_Bias_Error- This class is responsible for formatting bias error telemetry packets. It is used by the PmEvent class to format and post collections of bias errors.

RINGREC (not shown) - This is an ring buffer data record, used to transport FEP records from the FEP to the BEP via its ring-buffer. This structure consists of an array of thirty-two, 32-bit integers. Usually, this array is cast to the appropriate FEP record type by the consumer of the record.

37.3.2 Process Mode Leaf Classes

Figure 177 illustrates the class relationships between the bottom level data processing classes.

FIGURE 177. Processing Mode Leaf Class Relationships


PmTeHist - This class is a subclass of PmHist and is responsible for processing Timed Exposure histogram data produced by a single FEP. In addition to the record types handled by its parent classes, this class processes FEPeventRecHist data records, produced by a FEP. This class provides a member function to process FEP to BEP records (processRecord). It also provides member functions used internally to process the end of an exposure (finishExposure), to complete transmission of a histogram from one quadrant (finishQuadrant), to determine if all of the histogram data has been received from the FEP and processed (isEndOfHistogram), to incrementally pack bin data into the telemetry packet buffer (sendBins), and to setup a new telemetry data packet (setupDataPkt).

PmTeRaw - This class is a subclass of PmRaw and is responsible for processing Timed Exposure raw pixel data. In addition to the record types handled by its parent classes, this class processes FEPeventRecRaw data records produced by a FEP. This class provides a member function to process FEP to BEP records (processRecord). It provides internal member functions to process a complete raw mode data record (digestRawRecord), to setup a new telemetry data packet (setupDataPkt), and to complete an exposure (finishExposure).

PmCcRaw - This class is a subclass of PmRaw and is responsible for processing Continuous Clocking raw pixel data. This class handles FEPeventRecRaw data records produced by a FEP. This class provides a member function to process FEP to BEP records (processRecord). It provides internal member functions to process a complete raw mode data record (digestRawRecord), to setup a new telemetry data packet (setupDataPkt), and to complete an exposure (finishExposure).

PmTeFaint3x3 - This class is a subclass of PmEvent and is responsible for processing FEPeventRec3x3 event data records produced by a FEP, and producing Timed Exposure Faint Mode exposure records and data packets. This class provides functions which parse data records produced by a FEP (processRecord), accumulate and send processed events using a Timed Exposure Faint Mode data packet (sendEvent), and form and send a Timed Exposure Faint Mode Exposure Record at the end of each exposure (finishExposure).

PmTeFaintBias3x3 - This class is a subclass of PmEvent, and is responsible for processing FEPeventRec3x3 event data records produced by a FEP, and producing Timed Exposure Faint with Bias Mode exposure records and data packets.This class provides functions which parse data records produced by a FEP (processRecord), accumulate and send processed events using a Timed Exposure Faint-with-Bias Mode data packet (sendEvent), and form and send a Timed Exposure Faint-with-Bias Mode Exposure Record at the end of each exposure (finishExposure).

PmTeGraded -This class is a subclass of PmEvent, and is responsible for processing FEPeventRec3x3 event data records produced by a FEP, and producing Timed Exposure Graded Mode exposure records and data packets. This class provides functions which parse data records produced by a FEP (processRecord), accumulate and send processed events using a Timed Exposure Graded Mode data packet (sendEvent), and form and send a Timed Exposure Faint Mode Exposure Record (used by both Faint and Graded modes) at the end of each exposure (finishExposure).

PmCcFaint1x3 - This class is a subclass of PmEvent, and is responsible for processing FEPeventRec1x3 event data records produced by a FEP, and producing Continuous Clocking Faint Mode exposure records and data packets. This class provides functions which parse data records produced by a FEP (processRecord), accumulate and send processed events using a Continuous Clocking Faint Mode data packet (sendEvent), and form and send a Continuous Clocking Faint Mode Exposure Record at the end of each exposure (finishExposure).

PmCcGraded - This class is a subclass of PmEvent, and is responsible for processing FEPeventRec1x3 event data records produced by a FEP, and producing Continuous Clocking Graded Mode exposure records and data packets. This class provides functions which parse data records produced by a FEP (processRecord), accumulate and send processed events using a Continuous Clocking Graded Mode data packet (sendEvent), and form and send a Continuous Clocking Faint Mode Exposure Record (used by both Faint and Graded Modes) at the end of each exposure (finishExposure).

FEPeventRecHist - This is a data structure defined by the Front End to Back End interface. This structure contains an array of histogram bin values for each output node of the CCD being processed by a FEP. See Section 4.10 for a detailed description of the FEP to BEP science interface.

FEPeventRecRaw - This is a data structure defined by the Front End to Back End interface. This structure contains one row of raw pixel values clocked out of a CCD. See Section 4.10 for a detailed description of the FEP to BEP science interface.

FEPeventRec3x3 - This is a data structure defined by the Front End to Back End interface. This structure contains one candidate 3x3 event detected in the current exposure by the FEP. This record contains the image position of the event, and the 9 pixel pulse heights and bias values corresponding to the event. See Section 4.10 for a detailed description of the FEP to BEP science interface.

FEPeventRec1x3 - This is a data structure defined by the Front End to Back End interface. This structure contains one candidate 1x3 event detected in the current exposure by the FEP. This record contains the image position of the event, and the 3 pixel pulse heights and bias values corresponding to the event. See Section 4.10 for a detailed description of the FEP to BEP science interface.

NOTE: 5x5 and 1x5 processing modes are TBD. If implemented the following processing mode classes are needed: PmTeFaint5x5, PmTeFaintBias5x5, PmCcFaint1x5, and PmCcFaintBias1x5. For robustness, the PmTeGraded and PmCcGraded classes would be enhanced to be able to handle FEPeventRec5x5 and FEPeventRec1x5 classes, but their overall functionality would not change.

37.3.3 CCD Data Representation Classes

Figure 178 illustrates the relationships between the data representation classes used for processing CCD events.

FIGURE 178. CCD Data Class Relationships


PixelEvent - This class represents a candidate event produced from a CCD and detected by a Front End Processor. Using an EventExposure instance to supply image geometry information, threshold information, and exposure overclock values, this class provides functions which subclasses use to compute and store the CCD position of the event (setup), and the corrected pulse height of a single pixel value (correctPixelPh). This class contains two instance variables accessible to its subclasses which are used to retain the computed pulse height of the event, and the spatial distribution code (grade) of the event (vPh, vGrade). This class provides general client functions to access the position of the event, in CCD coordinates (getCcdPosition), the pulse height of the event (getPulseHeight), and the spatial distribution grade code of the event (getGrade).

Pixel1x3 - This class is a subclass of PixelEvent and represents a candidate event detected by a Front End Processor while its CCD is being clocked in Continuous Clocking Mode. This class provides a function to reference pixel values from a FEPeventRec1x3 event record, produced by a FEP (attachData). Once the data is loaded, this function computes the pulse height and grade of the event, storing the results in its parent's instance variables (computePhGrade). This class provides functions which clients use to obtain specific pixel pulse height and bias values (getPixel, getBias).

Pixel3x3 - This class is a subclass of PixelEvent and represents a 3x3 pixel event produced by a FEP while a CCD is being clocked in Timed Exposure Mode. It provides a function reference pixel values from a FEPeventRec3x3 event record produced by a FEP (attachData). Once the data is copied, this function also computes the pulse height of the event and its spatial distribution grade code (computePhGrade, gradeCornerPixel, gradeEdgePixel). This class provides functions which clients use to obtain specific pixel pulse height and bias values (getPixel, getBias).

PixelRow - This class represents one row of raw pixel pulse heights. It provides a function to establish a reference to a FEPeventRecRaw record produced by a FEP (attachData). Once the reference is established, this function also uses the geometry information in an EventExposure instance to map the row position and column range of the row of pixel values. The class provides a function which clients use to obtain the CCD row position and minimum and maximum column positions of the data (getRange). To support windowed clipping of the data, this class provides functions which accept and discard columns within the row (acceptRegion, discardRegion). These functions use an internal function to manipulate an array of flags which indicate which pixels to send (flagRegion). The function provides a function to setup the mask limits based on the number of columns in a row for this image (setup). It provides functions which supplies the next region of a row to be telemetered (getNextSendRegion), and which return a pointer to the pixel buffer array (getPixelPtr) and the overclock pixels (getOverclockPtr).

PhHistogram - This class respresents a histogram of raw pixel pulse heights produced by a FEP. The data is taken from an FEPeventRecHist record produced by a FEP. This class provides a function to load the histogram header information (copyHeader). It provides functions to retrieve the number of exposures that went into the histogram (getExposureCount), the first exposure accumulated (getExposureStart), and the last exposure in the histogram (getExposureEnd). It provides functions to obtain a quadrant's overclock maximum and minimum values (getOverclockMax, getOverclockMin), and to obtain a quadrant's overclock mean and variance (getOverclockMean, getOverclockVariance).

37.3.4 Science Mode and Processing Mode Classes

Figure 179 illustrates the relationships between the Timed Exposure Science Mode class and its various data processing modes, and Figure 180 illustrates the relationships between the Continuous Clocking Science Mode and its data processing mode classes.

FIGURE 179. Timed Exposure Mode's Data Processing Class Relationships


SmTimedExposure - This class is a subclass of ScienceMode and is responsible for managing a Timed Exposure science run. This class provides functions which stage the mode's parameter blocks prior to starting a run, and activates those parameters once ready to start the run (stageParameters, activateParameters). It provides functions to check the integrity of parameter blocks (checkBlock) and to dump the parameter blocks to telemetry (dumpParameters). This class provides functions which overwrite each FEP's bias map entries with bad pixel entries from the current bad pixel map and timed exposure bad column map (loadBadMaps). It also provides query functions to determine if a bias calibration phase is required for the configured mode, and if so, whether or not the mode requires the bias to be sent to the ground via the BiasThief (requiresBias, useBiasThief). This class provides functions used by its parent class to prepare the hardware and software for a particular science run (setupDea, setupFep, setupProcess), and internal functions which it uses to configure the particular details of the run (setupFepBlock, setupRaw, setupHist, setupEventProcess, setupFaint3x3, setupFaintBias3x3, setupGraded, setupPhFilter, setupWindowFitler, setupGradeFilter). This class uses the PramTe and DeaManager classes to configure the Detector Electronics Assembly for the run, and the FepManager class to identify and configure which Front End Processors to use. When configuring the processing modes, this class selects which ProcessMode leaf classes to use (PmTeRaw, PmTeHist, PmTeFaint3x3, PmTeFaintBias3x3, PmTeGraded), configures the selected instances, and sets up the selected class instances as the FEP process modes for the run. If filters are mandated by the particular processing mode, this class configures the required filter instances, and installs the configured filters into the processing modes. It provides a function which closes the current run and issues a science run report (terminate).

FIGURE 180. Continuous Clocking Mode's Data Processing Class Relationships


SmContClocking- This class is a subclass of ScienceMode and is responsible for managing a Continuous Clocking science run. This class provides functions which stage the mode's parameter blocks prior to starting a run, and activates those parameters once ready to start the run (stageParameters, activateParameters). It provides functions to check the integrity of parameter blocks (checkBlock) and to dump the parameter blocks to telemetry (dumpParameters). This class provides functions which overwrite each FEP's bias map entries with bad pixel entries from the current continuous clocking bad column map (loadBadMaps). It also provides query functions to determine if a bias is required for the configured mode, and if so, whether or not the mode requires the bias to be sent to the ground via the BiasThief (requiresBias, useBiasThief). This class provides functions used by its parent class to prepare the hardware and software for a particular science run (setupDea, setupFep, setupProcess), and internal functions which it uses to configure the particular details of the run (setupFepBlock, setupRaw, setupEventProcess, setupFaint1x3, setupGraded, setupPhFilter, setupWindowFitler, setupGradeFilter). This class uses the PramCc and DeaManager classes to configure the Detector Electronics Assembly for the run, and the FepManager class to identify and configure which Front End Processors to use. When configuring the processing modes, this class selects which ProcessMode leaf classes to use (PmCcRaw, PmCcFaint1x3, PmCcFaintBias1x3, PmCcGraded), configures the selected instances, and sets the selected class instances up as the FEP process modes for the run. If filters are mandated by the particular processing mode, this class configures the required filter instances, and installs the configured filters into the processing modes. It provides a function which closes the current run and issues a science run report (terminate).

37.4 Scenarios

37.4.1 Use 1: Timed Exposure Raw Mode Data Processing

Figure 181 illustrates the overall steps involved in configuring and running Timed Exposure Mode, producing raw exposure data.

FIGURE 181. Timed Exposure Raw Mode


  1. The scienceManager tells Timed Exposure Mode to activate its parameters using smTimedExposure.activateParameters(). The parameter blocks have been previously loaded from their parameter block lists via an earlier call to smTimedExposure.stageParameters() (not shown), when the initial command to start a run was received. The system of staging and then activating parameters ensures that the correct parameter blocks are used in cases where the start of the run has been deferred due to the radiation monitor, or other reasons.

  2. The scienceManager tells Timed Exposure Mode to setup for a run, using smTimedExposure.setup().

  3. setup() calls setupDea() to configure the DEA sequencer logic (PRAM and SRAM).

  4. setupDea() loads the SRAM into each DEA CCD-controller, using sramLibrary.load().

  5. setupDea() generates the sequencer load images by calling pramTe.configure() and pramTe.build() to build and load the hardware PRAM and SRAM with the images.

  6. setup() calls setupFep() to configure the Front End Processors, which calls setupFepBlock() to construct FEP parameter blocks.

  7. setupFep() loads the parameter blocks into the FEPs using fepManager.configureFep().

  8. setup() calls setupProcess() to configure the data process instances. setupProcess() determines from the parameters that raw mode is selected, and calls setupRaw() to configure the filters and process modes. setupRaw() uses assignFepProcess() to install each configured process mode into its table, fepProcess[].

  9. setupRaw() configures one PmTeRaw instance for each Front End Processor being used. It uses setMode() to establish itself as the source of telemetry packet buffers, setCcdId() to identify which CCD a particular instance is dealing with, setGeometry() to establish the clocked image scale and offset factors, setRunIdInfo() to establish the command and parameter block identifiers to report to telemetry, and setWindowFilter() to install the window list filter to use when processing data from the associated CCD.

  10. pmTeRaw.setGeometry() copies the reported image information into its expInfo instance, using expInfo.setGeometry().

  11. setupRaw() configures one window filter for each process mode being used. It uses filterWindow.resetWindows() to reset the state of a particular filter, and filterWindow.addWindow() to configure each clipping window in the filter.

  12. Once the mode has been configured, the scienceManager instructs the mode to telemeter its parameter blocks, using smTimedExposure.dumpParameters(). Once the parameter blocks have been posted to telemetry, the scienceManager queries the mode if a bias computation is needed, using smTimedExposure.requiresBias(). Bias computations are prohibited for raw mode processing, so smTimedExposure indicates that no bias computation is needed.

  13. The scienceManager tells the mode to start clocking, acquiring and processing images using smTimedExposure.processData().

  14. processData() starts the Front End raw-mode processing functions using fepManager.invokeDataProcess().

  15. processData() then tells the DEA to start clocking out images, using deaManager.invokeSequencer(), which reports the value of the starting microsecond science timestamp.

  16. processData() distributes the timestamp to each process mode instance using distributeRunInfo().

  17. distributeRunInfo() sets the timestamp of the most recent bias computation using pmTeRaw.setTimeBias(), and the current starting timestamp using pmTeRaw.setTimeData().

  18. processData() then enters its data processing loop, which terminates when the run is stopped. At the top of the loop, processData() calls waitForData() to wait for science data to arrive from one or more of the Front End Processors.

  19. waitForData() calls the scienceManager to wait for the event using scienceManager.waitForEvent().

  20. Later, once data becomes available, the fepManager notifies the scienceManager that data is ready using scienceManager.notify(). As a result of the notification, scienceManager.waitForEvent() wakes up and returns to smTimedExposure.processData()

  21. processData() calls readProcessRecords() to read records and process data records from the FEPs.

  22. readProcessRecords() calls fepManager.readRecord() to read one record from one of the Front End Processors.

  23. readProcessRecords() then identifies which FEP produced the data, and feeds a record to the corresponding process mode instance using pmTeRaw.processRecord().

  24. When processRecord() detects a start of exposure record (FEPexpRec), it copies the relevant information using expInfo.copyExpStart.

  25. When processRecord() detects a raw data record (FEPeventRecRaw), it starts constructing a complete raw row record from a series of FEP to BEP records. Subsequent calls to processRecord() append the record data to the partial row record until the record is complete. Once the record is complete, processRecord() processes the completed record using digestRawRecord() (not shown). It establishes a PixelRow instance, and associates the record using pixelRow.attachData().

  26. attachData() uses the expInfo structure to map the image row coordinates into absolute CCD coordinates using expInfo.mapPosition().

  27. pmTeRaw then filters the row using filterWindow.filterRow().

  28. filterRow() uses pixelRow.getRange() to find the position limits of the raw pixels, and, if needed, discards regions of the row using pixelRow.discardRegion().

  29. pmTeRaw.digestRawRecord() checks its data telemetry object, dataTlm, to see if it has a telemetry buffer (not shown). If not, pmTeRaw asks its science mode to wait for and allocate a telemetry packet buffer, by passing dataTlm to smTimedExposure.waitForPkt().

  30. waitForPkt() tells the passed telemetry object to wait for and allocate a packet. Whenever the time-out expires, waitForPkt() checks the science manager for certain pending events, such as task monitor queries, using scienceManager.requestEvent(), responds to the requests, and retries to obtain a telemetry packet buffer.

  31. Once dataTlm has a buffer, pmTeRaw.digestRawRecord() sets the header information in the packet, and compresses the data directly into the packet buffer's data area using rawHuffman.packData().

  32. Once the dataTlm's buffer is full, or the maximum number of rows have been packed into the buffer, digestRawRecord() posts the telemetry objects's buffer to telemetry using dataTlm.post().

  33. When processRecord() detects the end of an exposure (FEPexpEndRec), it copies the relevant information using expInfo.copyExpEnd(), and invokes finishExposure() (not shown).

  34. finishExposure() then establishes an exposure record telemetry object, exposureTlm, and obtains a telemetry packet buffer for the record. It then fills the exposure record header and tells the object to post its telemetry buffer for transfer, using exposureTlm.post().

  35. Later, when a command is received to stop the run, the scienceManager's binding function tells the mode to stop the current run, using smTimedExposure.requestStop(). Then, requestStop() sets an internal flag and notifies the task that a stop has been requested.

  36. If smTimedExpousre.processData() has called waitForData() to wait for data to arrive, the wait call aborts to allow processData to respond to the stop request. smTimedExposure.processData()'s loop detects the stop request in the internal flag, and tells the FEPs to finish up processing, using fepManager.terminateProcess(). It then continues its processing loop, waiting for and handling FEP data records, until the FEPs report that they are done (not shown). Once the FEPs have finished producing data, and all of the data records have been consumed, processData() stops the DEA sequencers using deaManager.stopSequencer() (not shown).

  37. Once processData() returns, scienceManager instructs the mode to cleanup from the run, using smTimedExposure.terminate().

37.4.2 Use 2: Timed Exposure Histogram Mode Data Processing

Figure 182 illustrates the overall steps involved in configuring and running Timed Exposure Mode, producing histograms of raw pixel pulse heights. Some of the setup and processing details are the same as those described for Raw Mode processing (see Section 37.4.1) and are omitted from the diagram and description.

FIGURE 182. Timed Exposure Raw Histogram Mode


  1. The scienceManager object sets up for a Timed Exposure Science Run, calling smTimedExposure.activateParameters() and smTimedExposure.setup().

  2. smTimedExposure.setup() calls setupDea(), setupFep, and setupProcess() to configure the hardware and the internal structures for the run. setupProcess() determines that Histogram processing was selected and calls setupHist(), which selects the set of PmTeHist instances and configures each instance.

  3. scienceManager initiates a parameter dump, using smTimedExposure.dumpParameters(). scienceManager determines if a bias computation is needed by calling smTimedExposure.requiresBias().

  4. smTimedExposure.processData() starts data processing on each of the configured FEPs using fepManager.invokeDataProcess().

  5. It then starts the sequencers using deaManager.invokeSequencer(), and stores the science microsecond timestamp as the start time of the data processing run.

  6. processData() then waits for data to arrive from the FEPs using waitForData().

  7. waitForData() calls the scienceManager to wait for the event using scienceManager.waitForEvent().

  8. Once data arrives, processData() reads one record from one of the FEPs using fepManager.readRecord().

  9. processData() then passes the record to pmTeHist.processRecord() to be processed.

  10. Whenever processRecord() reads an Exposure Start Record (FEPexpRec), it passes it to expInfo.copyExpStart() to extract exposure information, such as the overclock values used for the reported exposure.

  11. When processRecord() reads a Histogram Event Data Record (FEPeventRecHist), it copies the header information from the record using phHistogram.copyHeader(). Then proceeds to accumulate and store bin data as it arrives from subsequent records from the FEP.

  12. For each data packet it creates, pmTeHist stores the starting bin number into the telemetry packet buffer. It the adds the bin values directly into the telemetry buffer. Whenever a buffer becomes full, or when the histogram for one of the quadrants has been completed, pmTeHist posts the data packet buffer to telemetry using dataTlm.post().

  13. Once the histogram from a quadrant has been posted, pmTeHist forms a histogram record telemetry packet buffer, fills in the packet information and posts it to telemetry using exposureTlm.post().

  14. Eventually, the scienceManager instructs the mode to stop the run, using smTimedExposure.requestStop(). Once the FEPs have completed the last histogram, and their data have been posted for transfer, the scienceManager tells the mode to cleanup from the run, using smTimedExposure.terminate() (not shown).

37.4.3 Use 3: Timed Exposure Faint Mode 3x3 Event Data Processing

Figure 183 illustrates the overall steps involved in configuring and running Timed Exposure Mode, producing Faint Mode 3x3 event lists. Some of the setup and processing details are the same as those described for Raw Mode processing (see Section 37.4.1) and are omitted from the diagram and description. All of the other event processing modes have the same overall structure, and their descriptions refer to this mode.

FIGURE 183. Timed Exposure Faint 3x3 Event Mode


  1. The scienceManager object sets up for a Timed Exposure Science Run, calling smTimedExposure.activateParameters() and smTimedExposure.setup().

  2. smTimedExposure.setup() calls setupDea(), setupFep, and setupProcess() to configure the hardware and the internal structures for the run.

  3. setupProcess() determines that Faint Mode 3x3 Event processing was selected and calls setupFaint3x3(), which selects the set of PmTeFaint3x3 instances, and calls setupEventProcess() to configure each instance. setupEventProcess() configures a set of pulse height, window and grade filters using setupPhFilter(), setupWindowFilter(), and setupGradeFilter() respectively.

  4. setupEventProcess() configures each pmTeFaint3x3 object, installing the instance's pulse height, window and grade filters using setPhFilter(), setWindowFilter(), and setGradeFilter() respectively. setupEventProcess() then installs the process mode into its array of pointers (not shown).

  5. scienceManager initiates a parameter dump, using smTimedExposure.dumpParameters(). scienceManager determines if a bias computation is needed by calling smTimedExposure.requiresBias(). Assume for this example that the parameter block mandates a bias computation. Upon determining that a bias computation is needed, the scienceManager starts the bias computations using smTimedExposure.computeBias().

  6. smTimedExposure.computeBias() starts the bias computation process on each of the configured Front Ends, using fepManager.invokeBiasProcess().

  7. Once the FEPs are ready to receive images, computeBias() starts the DEA sequencers, using deaManager.invokeSequencer(), storing the returned science microsecond timestamp as the start time of the most recent bias computation (a static instance variable of ScienceMode maintained in D-cache).

  8. computeBias() then waits for the bias computations to complete on all of the FEPs, using waitForBias().

  9. waitForBias() uses the scienceManager.waitForEvent() to block execution until the bias computations complete. Later, once all of the active FEPs have completed their bias computations, the fepManager notifies the scienceManager (not shown). After the bias computations have completed, computeBias() shuts down the sequencers using deaManager.stopSequencer() (not shown).

  10. The scienceManager then overwrites the pixel bias values corresponding to bad pixels and columns using smTimedExposure.loadBadMaps(). Once the maps are loaded, the scienceManager starts data processing, calling smTimedExposure.processData().

  11. smTimedExposure.processData() starts data processing on each of the configured FEPs using fepManager.invokeDataProcess(). It then starts the sequencers using deaManager.invokeSequencer() (not shown), and stores the science microsecond timestamp as the start time of the data processing run.

  12. processData() then sets the start times within each of the process modes, using pmTeFaint3x3.setTimeBias() and pmTeFaint3x3.setTimeData().

  13. processData() then waits for data to arrive from the FEPs using waitForData().

  14. Once data arrives, processData() reads one or more records from one of the FEPs using fepManager.readRecord(). and calls pmTeFaint3x3.processRecord() to process the acquired FEP record.

  15. Whenever processRecord() reads an Exposure Start Record (FEPexpRec), it passes it to expInfo.copyExpStart() to extract exposure information, such as the overclock values used for the reported exposure.

  16. When processRecord() reads a 3x3 Event Data Record (FEPeventRec3x3), it forms a temporary Pixel3x3 instance, and loads it with the data record, using pixel3x3.attachData().

  17. attachData() maps the image row and column position into absolute CCD coordinates, using expInfo.mapPosition(). It then, for each of the three pixel columns of the event, loads the exposure overclock information, using expInfo.getOverclockDelta(), and loads the configured split threshold levels using expInfo.getSplitThresholds().

  18. attachData() then computes the event's pulse height and grade using computePhGrade(). For each pixel, computePhGrade() uses correctPixelPh() (not shown) to determine the corrected pulse height of a pixel, based on the raw pixel pulse height, pixel bias level and overclock level. computePhGrade() then uses gradeEdgePixel() (not shown) to compare the corrected value against the split threshold. If the value is greater than or equal to its column's split threshold, it sets the pixel's grade bit in the grade code and adds its pulse height to the current sum for the event. It then sets flags indicating that the adjacent corner pixels are permitted to contribute to the pulse height of the event. Once the edge pixels have been evaluated, computePhGrade() uses gradeCornerPixel() (not shown) to process each corner pixel of the 3x3 event. gradeCornerPixel() compares the pixel's corrected pulse height to its split threshold. If it is greater than or equal to the split threshold, it sets the pixel's grade bit in the grade code. It then determines if the corner pixel is adjacent to an edge pixel above split threshold. If so, it adds the corner pixel's corrected pulse height to the total energy of the event. If not, although the pixel's grade bit may be set, the corner pixel's pulse height is not added to the total energy.

  19. pmTeFaint3x3.processRecord() then calls pmTeFaint3x3.filterEvent() (not shown) to run the event through its filter set. filterEvent() determines if the event should be telemetered based on its pulse height using filterPh.filterEvent().

  20. filterPh.filterEvent() queries the computed pulse height of the event using pixel3x3.getPulseHeight(), and compares the value with its configured limits. If the pulse height is within its limits, the event is accepted. If not, the event is rejected.

  21. If the pulse height filter accepts the event, pmTeFaint3x3.filterEvent() calls filterWindow.filterEvent() to test the event against the configured 2-D windows.

  22. filterWindow.filterEvent() uses pixel3x3.getCcdPosition() to obtain the CCD row and column of the center of the event. It then checks the position against each of its configured windows. If the event is within the bounds of one of its windows, it checks the sample counter for the window against the window's limit, and increments the counter. If the limit is 0, or if the counter is at the configured limit, filterWindow.filterEvent() gets the pulse height of the event using pixel3x3.getPulseHeight() and resets the counter. If the pulse height is within the bounds of the event, the event is accepted for further processing. If either the sample counter has not reached its limit, or if the pulse height of the event is outside the bounds configured for the window, the event is rejected.

  23. If the window filter accepts the event, pmTeFaint3x3.filterEvent() calls filterGrade.filterEvent() to test the event's grade against the set of accepted grades.

  24. filterGrade.filterEvent() calls pixel3x3.getGrade() to obtain the computed grade code of the event. If the code is in the filters list of accepted grades, the event is accepted, otherwise it is rejected.

  25. If the event is accepted by all of the event filters, processRecord() calls sendEvent() (not shown) to add the event to its data packet buffer. sendEvent() checks the state of its data telemetry object, dataTlm. If it does not have a telemetry packet buffer, sendEvent() obtains the packet buffer (see Section 37.22.4), and sets the packet's data header information. It then tells the packet to pack the event into its data area, using dataTlm.append_Event().

  26. sendEvent() determines if the packet's buffer becomes full using dataTlm.isFull(). If the packet becomes full, it posts the packet's data to telemetry using dataTlm.post().

  27. When processRecord() receives an End of Exposure record (FEPexpEndRec), it uses expInfo.copyExpEnd() (not shown) to extract the ending exposure information from the record. It then establishes an exposure record telemetry object, waiting for and allocating a telemetry packet buffer (not shown). Once the object has a buffer, it stores the exposure header information into the packet buffer. Once the exposure record is complete, its telemetry packet buffer is posted for transfer to telemetry using exposureTlm.post().

  28. Eventually, the scienceManager instructs the mode to stop the run, using smTimedExposure.requestStop(). Once the FEPs have completed the last exposure, and their data have been posted for transfer, the scienceManager tells the mode to cleanup from the run, using smTimedExposure.terminate().

37.4.4 Use 4: Timed Exposure Faint Mode 3x3 with Bias Data Processing

The overall operation of this data processing mode is identical to that used by Faint 3x3 Mode (see Section 37.4.3), except that a PmTeFaintBias3x3 instance is used, the telemetry packet formats are slightly different, and the sendEvent() member function of PmTeFaintBias3x3 adds event bias information to the data telemetry packet, which is not present in Faint Mode.

37.4.5 Use 5: Timed Exposure Graded Mode Data Processing

The overall operation of this data processing mode is identical to that used by Faint 3x3 Mode (see Section 37.4.3), except that a PmTeGraded instance is used, the telemetry packet formats are slightly different, and the sendEvent() member function of PmTeGraded sends event amplitude, grade, and corner pulse height sums instead of the raw pixel pulse heights sent by Faint Mode.

37.4.6 Use 6: Continuous Clocking Raw Mode Data Processing

The overall operation of Continuous Clocking Raw Mode is identical to that used by Timed Exposure Raw Mode (see Section 37.4.1), except that pramCc is used to configure the sequencers PRAM, a PmCcRaw instance is used to process the raw data, and the low-level details of the setup functions are slightly different, given the different nature of the parameter blocks, CCD data, and telemetry formats.

37.4.7 Use 7: Continuous Clocking Faint Mode 1x3 Event Data Processing

The overall operation of this data processing mode is identical to that used by Timed Exposure Faint 3x3 Mode (see Section 37.4.3), except the mode used is SmContClocking, a PmCcFaint1x3 instance is used, a Pixel1x3 class is used to represent the data instead of a Pixel3x3 class, the telemetry packet formats are slightly different, and the sendEvent() member function of PmCcFaint1x3 produces 1x3 pixel pulse height data instead of 3x3 event data.

37.4.8 Use 8: Continuous Clocking Graded Mode Data Processing

The overall operation of this data processing mode is identical to that used by Timed Exposure Faint 3x3 Mode (see Section 37.4.3), except the mode used is SmContClocking, a PmCcGraded instance is used, a Pixel1x3 class is used to represent the data instead of a Pixel3x3 class, the telemetry packet formats are slightly different, and the sendEvent() member function of PmCcGraded produces events represented by a event amplitude, and a 2-bit grade code.

.


37.5 Class SmTimedExposure

Documentation:
This class represents the Timed Exposure Science Mode and is responsible for providing member functions which configure and run a Timed Exposure science and/or bias run.
Export Control:
Public
Cardinality:
1

Hierarchy:

Superclasses:

ScienceMode

Implementation Uses:

PblTimedExp
DeaManager
FepManager
Pbl2dWindow
PramTe
SramLibrary
Tf_Dump_Te_Block

Public Interface:

Operations:

SmTimedExposure()
activateParameters()
checkBlock()
dumpParameters()
loadBadMaps()
requiresBias()
stageParameters()
terminate()
useBiasThief()

Protected Interface:

Has-A Relationships:


PmTeFaintBias3x3 pmTeFaintBias3x3[6]: These are the process modes used to process Timed Exposure 3x3 Faint-with-Bias Mode event data, indexed by FEP Id.

PmTeGraded pmTeGraded[6]: These are the process modes used to process Timed Exposure Graded Mode event data, indexed by FEP Id.

PmTeHist pmTeHist[6]: These are the process modes used to process Timed Exposure histograms, indexed by FEP Id.

PmTeRaw pmTeRaw[6]: These are the process modes used to process Timed Exposure Raw mode data, indexed by FEP Id.

PmTeFaint3x3 pmTeFaint3x3[6]: These are the process modes used to process Timed Exposure 3x3 Faint Mode event data, indexed by FEP Id.

Operations:

getBlockIds()
getFepRequest()
setupDea()
setupEventProcess()
setupProcess()
setupFaint3x3()
setupFaintBias3x3()
setupFep()
setupFepBlock()
setupGraded()
setupGradeFilter()
setupHist()
setupPhFilter()
setupRaw()
setupWindowFilter()

Private Interface:

Has-A Relationships:


CmdPkt_Load_Te_Block teBlock: This is the active Timed Exposure Parameter Block being used for the current run.

CmdPkt_Load_Te_Block stagedTeBlock: This is the next Timed Exposure Parameter block to use. This block is setup by the command requesting the start of a new run, and is copied into teBlock once the run starts.

CmdPkt_Load_2D_Block winBlock: This is the active 2D Window Parameter Block, if one is being used.

CmdPkt_Load_2D_Block stagedWinBlock: This is the window parameter block to use for the next run. It is setup by the handler which requested the new run, and is copied into winBlock once the run starts.

Boolean hasWindows: This flag indicates whether or not the active parameter block is using window filters.

CcdId fepCcd: This is an array of CCD identifiers extracted from the active parameter block. The array is indexed by FEP Id.

Boolean fepVideo[6]: This is an array of FEP video gain selection, indexed by FEP Id and extracted from the active parameter block. BoolFalse indicates that the FEP's CCD should be clocked using 1electron/ADU. BoolTrue indicates that the CCD should be clocked to obtain 4 electrons/ADU.

int fepThresh[6][4]: This is an array of FEP quadrant threshold settings. The settings are indexed by FEP Id and video chain.

unsignedfepSplit[6][4]: This is an array of split threshold settings, indexed by FEP. These are copied from the active parameter block.

unsigned ccdsUsed: This specifies the total number of CCDs being used for the active run.

unsigned ccdSlot[10]: This is an array, indexed by CCD Id, which maps a CCD to a particular Image to Frame transfer slot for the active run.

Boolean biasOk: This indicates if the bias maps are intact. If BoolTrue, then all configured bias maps are ready. If BoolFalse, then one or more bias maps need to be built.
Concurrency:
Synchronous
Persistence:
Persistent

37.5.1 SmTimedExposure()

Public member of:
SmTimedExposure
Documentation:
This is the constructor for the SmTimedExposure class. This function sets the instance variables of the class to default values.
Concurrency:
Guarded

37.5.2 activateParameters()

Public member of:
SmTimedExposure
Return Class:
void
Documentation:
This function copies the parameter blocks staged in stagedTeBlock and stagedWinBlock into teBlock and winBlock.
Semantics:
Get the buffer address of the staged and main blocks, and get the length of the staged block and copy the data from the staged block into the main block. Then check the block if a window is specified, and if so, copy the staged window block into the active window block. Using the now active block, cache the FEP to CCD selections, FEP video selections and FEP threshold and split threshold selections into fepCcd, fepVideo, fepThresh, and fepSplit, respectively. Then iterate through the FEP CCD selections and verify that the corresponding DEA and FEP boards have power. If a DEA board or FEP board isn't powered, invalidate the corresponding FEP's CCD selection to prevent the run from using the FEP. If the boards are on, store the current active CCD count as the clocking parallel transfer slot to use when clocking the chip, and advance the total number of chips configured for use during the run.
Concurrency:
Guarded

37.5.3 checkBlock()

Public member of:
SmTimedExposure
Return Class:
Boolean

Arguments:

unsigned blockid
Documentation:
This function checks the integrity of the Timed Exposure parameter block, indicated by blockid. If the parameter block is intact, the function returns BoolTrue. If the block has been corrupted, the function returns BoolFalse.
Concurrency:
Synchronous

37.5.4 dumpParameters()

Public member of:
SmTimedExposure
Return Class:
Boolean
Documentation:
This function posts the contents of the active Timed Exposure and 2D window parameters to telemetry. If successful, the function returns BoolTrue. If the run is aborted, it returns BoolFalse.
Semantics:
Declare a Timed Exposure Parameter block form, and use waitForPkt() to obtain a telemetry packet buffer for the form. If the run is aborted while waiting for the buffer, return BoolFalse. Once a buffer has been obtained, copy the active Timed Exposure Parameter Block into the buffer. If a window list is used, append the active 2D Window list to the buffer. Then post the buffer for transfer to telemetry.
Concurrency:
Guarded

37.5.5 getBlockIds()

Protected member of:
SmTimedExposure
Return Class:
void

Arguments:

unsigned& blockId
unsigned& winId
Documentation:
This function retrieves the parameter block ids from the Timed Exposure Parameter block and the 2D Window parameter block (if used). On return, blockId will contain the parameter block id from the active Timed Exposure Parameter Block. If a 2D window is used, winId will contain its parameter block id. If not, winId will contain 0xffffffff.
Concurrency:
Guarded

37.5.6 getFepRequest()

Protected member of:
SmTimedExposure
Return Class:
int
Documentation:
This function returns the FEP request code used to start Timed Exposure science data processing.
Concurrency:
Guarded

37.5.7 loadBadMaps()

Public member of:
SmTimedExposure
Return Class:
void
Documentation:
This function loads the bad pixels and timed exposure bad columns into their respective FEP bias maps.
Concurrency:
Guarded

37.5.8 requiresBias()

Public member of:
SmTimedExposure
Return Class:
Boolean
Documentation:
This function determines if a bias computation is required. It first checks the parameter block for a bias request. If a bias is not mandated by the parameter block, it then queries each configured FEP to ensure that each has a valid bias. If either the parameter block mandates a bias computation, or if a FEP has an invalid bias, the function returns BoolTrue. If no bias is required by the configured mode, then it returns BoolFalse.
Concurrency:
Guarded

37.5.9 setupDea()

Protected member of:
SmTimedExposure
Return Class:
void
Documentation:
This function loads the Timed Exposure SRAM image into the DEA CCD-controllers, and uses the PRAM Builder to build and load the Timed Exposure clocking operations into the CCD-controller's PRAM.
Semantics:
If the run has a custom DEA load block, use deaManager.loadSequencers() to load it into the CCD controllers. If not, iterate through each configured FEP. Load the SRAM library using sramLibrary.load(), configure the PRAM builder and build and load the PRAM using pramTe.configure() and pramTe.build().
Concurrency:
Guarded

37.5.10 setupEventProcess()

Protected member of:
SmTimedExposure
Return Class:
void

Arguments:

FepId fep
PmEvent& process
Documentation:
This function configures the event process, indicated by process, to handle events produced by the FEP, fep. It configures the run-header information, CCD geometry, sets up the filters, installs the filters, and installs process in the mode's CCD processor pointer array.
Concurrency:
Guarded

37.5.11 setupFaint3x3()

Protected member of:
SmTimedExposure
Return Class:
void
Documentation:
This function sets up for Faint 3x3 event processing. This function iterates through each configured FEP, passing a separate PmTeFaint3x3 instance to setupEventProcess() for each FEP being used.
Concurrency:
Guarded

37.5.12 setupFaintBias3x3()

Protected member of:
SmTimedExposure
Return Class:
void
Documentation:
This function sets up for Faint 3x3 with Bias event processing. This function iterates through each configured FEP, passing a separate PmTeFaintBias3x3 instance to setupEventProcess() for each FEP being used.
Concurrency:
Guarded

37.5.13 setupFep()

Protected member of:
SmTimedExposure
Return Class:
void
Documentation:
This function loads code into each of the configured FEPs, and sets up the Timed Exposure mode parameters into each.
Semantics:
For each configured FEP, first load and run any customized code into the FEP, using fepManager.loadRunProgram(). Then query the status of the FEP, using fepManager.queryFepStatus(). If the query failed, then the FEP has crashed. Restart the FEP using the default program load. Use setupFepBlock() to build the BEP to FEP parameter block, and use fepManager.configureFep() to load the configuration into the FEP.
Concurrency:
Guarded

37.5.14 setupFepBlock()

Protected member of:
SmTimedExposure
Return Class:
Boolean

Arguments:

FepId fep
FEPparmBlock& fepblock
Documentation:
This function sets up a Front End Processor Parameter Block, fepblock, for the FEP specified by fep. If successful, the function returns BoolTrue. If the FEP did not respond, it returns BoolFalse.
Concurrency:
Guarded

37.5.15 setupGradeFilter()

Protected member of:
SmTimedExposure
Return Class:
void

Arguments:

FepId fep
FilterGrade& grade
Documentation:
This function sets up the Grade filter, grade, using the active grade selection. The passed FEP identifier, fep, is a hook to support enhancements which make the grade selection FEP-specific.
Concurrency:
Guarded

37.5.16 setupGraded()

Protected member of:
SmTimedExposure
Return Class:
void
Documentation:
This function sets up for Graded event processing.This function iterates through each configured FEP, passing a separate PmTeGraded instance to setupEventProcess() for each FEP being used.
Concurrency:
Guarded

37.5.17 setupHist()

Protected member of:
SmTimedExposure
Return Class:
void
Documentation:
This function sets up for Histogram data processing.This function iterates through each configured FEP. For each FEP in use, it sets the mode, the CCD Id, and the geometry into a separate PmTeHist, and passes the instance to assignFepProcess() to associate the instance with the FEP.
Concurrency:
Guarded

37.5.18 setupPhFilter()

Protected member of:
SmTimedExposure
Return Class:
void

Arguments:

FepId fep
FilterPh& phFilter
Documentation:
This function configures the Pulse Height filter, phFilter. The passed FEP identifier, fep, is a hook to support changes which would make the pulse height selections FEP-specific.
Concurrency:
Guarded

37.5.19 setupProcess()

Protected member of:
SmTimedExposure
Return Class:
void
Documentation:
This function sets up the processing objects used to process data for the run.
Semantics:
This function examines the configured FEP and BEP processing mode selections. If performing raw mode, call setupRaw(). If performing histogram mode, call setupHist(). If performing 3x3 Faint Mode, call setupFaint3x3(). If performing Faint-with-Bias, call setupFaintBias3x3(), and if performing Graded Mode, call setupGraded().
Concurrency:
Guarded

37.5.20 setupRaw()

Protected member of:
SmTimedExposure
Return Class:
void
Documentation:
This function sets up for Raw data processing. For each FEP in use, it sets the mode, the CCD Id, geometry, into a separate PmTeRaw instance. It also sets up a distinct window list filter and assigns it to the PmTeRaw instance. It then passes the instance to assignFepProcess() to associate the instance with the FEP.
Concurrency:
Guarded

37.5.21 setupWindowFilter()

Protected member of:
SmTimedExposure
Return Class:
void

Arguments:

FepId fep
FilterWindow& window
Documentation:
This function sets up the window list filter, window, using the active window parameters used by the CCD being processed by the FEP, fep.
Concurrency:
Guarded

37.5.22 stageParameters()

Public member of:
SmTimedExposure
Return Class:
void

Arguments:

unsigned blockid
Documentation:
This function fetches the Timed Exposure parameter block, indicated by blockid, and stores its contents into stagedTeBlock. If a window block is referenced within the block, it is fetched and stored into stagedWinBlock.
Concurrency:
Synchronous

37.5.23 terminate()

Public member of:
SmTimedExposure
Return Class:
void
Documentation:
This function cleans up after a Timed Exposure science run. It produces and posts a science run report.
Concurrency:
Guarded

37.5.24 useBiasThief()

Public member of:
SmTimedExposure
Return Class:
Boolean
Documentation:
This function determines whether or not the Bias Thief should be invoked. It returns BoolTrue if the bias thief should send the pixel bias values, and BoolFalse if not.
Concurrency:
Guarded

37.6 Class SmContClocking

Documentation:
This class represents the Continuous Clocking Science Mode and is responsible for providing member functions which configure and run a Continuous Clocking science and/or bias run.
Export Control:
Public
Cardinality:
1

Hierarchy:

Superclasses:

ScienceMode

Implementation Uses:

DeaManager
FepManager
Pbl1dWindow
PramCc
SramLibrary
PblContClock
Tf_Dump_Cc_Block

Public Interface:

Operations:

SmContClocking()
activateParameters()
checkBlock()
dumpParameters()
loadBadMaps()
requiresBias()
stageParameters()
terminate()
useBiasThief()

Protected Interface:

Has-A Relationships:


PmCcGraded pmCcGraded[6]: These are the process modes used to process Continuous Clocking Graded Mode event data, indexed by FEP Id.

PmCcRaw pmCcRaw[6]: These are the process modes used to process Continuous Clocking Raw Mode event data, indexed by FEP Id.

PmCcFaint1x3 pmCcFaint1x3[6]: These are the process modes used to process Continuous Clocking Faint Mode event data, indexed by FEP Id.

Operations:

getBlockIds()
getFepRequest()
setupDea()
setupEventProcess()
setupFaint1x3()
setupFep()
setupFepBlock()
setupGradeFilter()
setupGraded()
setupPhFilter()
setupProcess()
setupRaw()
setupWindowFilter()

Private Interface:

Has-A Relationships:


CmdPkt_Load_Cc_Block ccBlock: This is the active Continuous Clocking Parameter Block being used for the current run.

CmdPkt_Load_Cc_Block stagedCcBlock: This is the next Continuous Clocking Parameter block to use. This block is setup by the command requesting the start of a new run, and is copied into ccBlock once the run starts.

CmdPkt_Load_1D_Block winBlock: This is the active 1D Window Parameter Block, if one is being used.

CmdPkt_Load_1D_Block stagedWinBlock: This is the window parameter block to use for the next run. It is setup by the handler which requested the new run, and is copied into winBlock once the run starts.

Boolean hasWindows: This flag indicates whether or not the active parameter block is using window filters.

CcdId fepCcd[6]: This is an array of CCD identifiers extracted from the active parameter block. The array is indexed by FEP Id.

Boolean fepVideo[6]: This is an array of FEP video gain selection, indexed by FEP Id and extracted from the active parameter block. BoolFalse indicates that the FEP's CCD should be clocked using 1electron/ADU. BoolTrue indicates that the CCD should be clocked to obtain 4 electrons/ADU.

int fepThresh[6][4]: This is an array of FEP quadrant threshold settings. The settings are indexed by FEP Id and video chain.

unsigned fepSplit[6][4]: This is an array of split threshold settings, indexed by FEP. These are copied from the active parameter block.

Boolean biasOk: This indicates if the bias maps are intact. If BoolTrue, then all configured bias maps are ready. If BoolFalse, then one or more bias maps need to be built.
Concurrency:
Synchronous
Persistence:
Persistent

37.6.1 SmContClocking()

Public member of:
SmContClocking
Documentation:
This is the constructor for the SmContClocking class. This function sets the instance variables of the class to default values.
Concurrency:
Guarded

37.6.2 activateParameters()

Public member of:
SmContClocking
Return Class:
void
Documentation:
This function copies the parameter blocks staged in stagedCcBlock and stagedWinBlock into ccBlock and winBlock.
Semantics:
Get the buffer address of the staged and main blocks, and get the length of the staged block and copy the data from the staged block into the main block. Then check the block if a window is specified, and if so, copy the staged window block into the active window block. Using the now active block, cache the FEP to CCD selections, FEP video selections and FEP threshold and split threshold selections into fepCcd, fepVideo, fepThresh, and fepSplit, respectively. Then iterate through the FEP CCD selections and verify that the corresponding DEA and FEP boards have power. If a DEA board or FEP board isn't powered, invalidate the corresponding FEP's CCD selection to prevent the run from using the FEP.
Concurrency:
Guarded

37.6.3 checkBlock()

Public member of:
SmContClocking
Return Class:
Boolean

Arguments:

unsigned blockid
Documentation:
This function checks the integrity of the Continuous Clocking parameter block, indicated by blockid. If the parameter block is intact, the function returns BoolTrue. If the block has been corrupted (or contains invalid parameters TBD), the function returns BoolFalse.
Concurrency:
Synchronous

37.6.4 dumpParameters()

Public member of:
SmContClocking
Return Class:
Boolean
Documentation:
This function posts the contents of the active Continuous Clocking and 1D window parameters to telemetry. If successful, the function returns BoolTrue. If the run was aborted, it returns BoolFalse.
Semantics:
Declare a Continuous Clocking Parameter block form, and use waitForPkt() to obtain a telemetry packet buffer for the form. If the run is aborted while waiting for the buffer, return BoolFalse. Once a buffer has been obtained, copy the active Continuous Clocking Parameter Block into the buffer. If a window list is used, append the active 1D Window list to the buffer. Then post the buffer for transfer to telemetry.
Concurrency:
Guarded

37.6.5 getBlockIds()

Protected member of:
SmContClocking
Return Class:
void

Arguments:

unsigned& blockId
unsigned& winId
Documentation:
This function retrieves the parameter block ids from the Continuous Clocking Parameter block and the 1D Window parameter block (if used). On return, blockId will contain the parameter block id from the active Continuous Clocking Parameter Block. If a 1D window is used, winId will contain its parameter block id. If not, winId will contain 0xffffffff.
Concurrency:
Guarded

37.6.6 getFepRequest()

Protected member of:
SmContClocking
Return Class:
int
Documentation:
This function returns the FEP request code used to start Continuous Clocking science data processing.
Concurrency:
Guarded

37.6.7 loadBadMaps()

Public member of:
SmContClocking
Return Class:
void
Documentation:
This function loads the bad pixels and Continuous Clocking bad columns into their respective FEP bias maps.
Concurrency:
Guarded

37.6.8 requiresBias()

Public member of:
SmContClocking
Return Class:
Boolean
Documentation:
This function determines if a bias computation is required. It first checks the parameter block for a bias request. If a bias is not mandated by the parameter block, it then queries each configured FEP to ensure that each has a valid bias. If either the parameter block mandates a bias computation, or if a FEP has an invalid bias, the function returns BoolTrue. If no bias is required by the configured mode, then it returns BoolFalse.
Concurrency:
Guarded

37.6.9 setupDea()

Protected member of:
SmContClocking
Return Class:
Boolean
Documentation:
This function loads the Continuous Clocking SRAM image into the DEA CCD-controllers, and uses the PRAM Builder to build and load the Continuous Clocking clocking operations into the CCD-controller's PRAM. If successful, this function returns BoolTrue. If none of the controllers were loaded, the function returns BoolFalse.
Semantics:
If the run has a custom DEA load block, use deaManager.loadSequencers() to load it into the CCD controllers. If not, iterate through each configured FEP. Load the SRAM library using sramLibrary.load(), configure the PRAM builder and build and load the PRAM using pramCc.configure() and pramCc.build().
Concurrency:
Guarded

37.6.10 setupEventProcess()

Protected member of:
SmContClocking
Return Class:
void

Arguments:

FepId fep
PmEvent& process
Documentation:
This function configures the event process, indicated by process, to handle events produced by the FEP, fep. It configures the run-header information, CCD geometry, sets up the filters, installs the filters, and installs process in the mode's CCD processor pointer array.
Concurrency:
Guarded

37.6.11 setupFaint1x3()

Protected member of:
SmContClocking
Return Class:
void
Documentation:
This function sets up for Faint 1x3 event processing. This function iterates through each configured FEP, passing a separate PmCcFaint1x3 instance to setupEventProcess() for each FEP being used.
Concurrency:
Guarded

37.6.12 setupFep()

Protected member of:
SmContClocking
Return Class:
Boolean
Documentation:
This function loads code into each of the configured FEPs, and sets up the Continuous Clocking mode parameters into each. If successful, the function returns BoolTrue. If no FEPs were successfully configured, the function returns BoolFalse.
Semantics:
For each configured FEP, first load and run any customized code into the FEP, using fepManager.loadRunProgram(). Then query the status of the FEP, using fepManager.queryFepStatus(). If the query fails, then the FEP has crashed. Restart the FEP using the default program load. Use setupFepBlock() to build the BEP to FEP parameter block, and use fepManager.configureFep() to load the configuration into the FEP.
Concurrency:
Guarded

37.6.13 setupFepBlock()

Protected member of:
SmContClocking
Return Class:
Boolean

Arguments:

FepId fep
FEPparmBlock& fepblock
Documentation:
This function sets up a Front End Processor Parameter Block, fepblock, for the FEP specified by fep. If successful, the function returns BoolTrue. If the FEP did not respond, it returns BoolFalse.
Concurrency:
Guarded

37.6.14 setupGradeFilter()

Protected member of:
SmContClocking
Return Class:
void

Arguments:

FepId fep
FilterGrade& grade
Documentation:
This function sets up the Grade filter, grade. The passed FEP identifier, fep, is a hook to support enhancements which make the grade selection FEP-specific.
Concurrency:
Guarded

37.6.15 setupGraded()

Protected member of:
SmContClocking
Return Class:
void
Documentation:
This function sets up for Graded event processing.This function iterates through each configured FEP, passing a separate PmCcGraded instance to setupEventProcess() for each FEP being used.
Concurrency:
Guarded

37.6.16 setupPhFilter()

Protected member of:
SmContClocking
Return Class:
void

Arguments:

FepId fep
FilterPh& phFilter
Documentation:
This function configures the Pulse Height filter, phFilter. The passed FEP identifier, fep, is a hook to support enhancements which make the grade selection FEP-specific.
Concurrency:
Guarded

37.6.17 setupProcess()

Protected member of:
SmContClocking
Return Class:
void
Documentation:
This function sets up the processing objects used to process data for the run.
Semantics:
This function examines the configured FEP and BEP processing mode selections. If performing raw mode, call setupRaw(). If performing 1x3 Faint Mode, call setupFaint1x3(), and if performing Graded Mode, call setupGraded().
Concurrency:
Guarded

37.6.18 setupRaw()

Protected member of:
SmContClocking
Return Class:
void
Documentation:
This function sets up for Raw data processing. For each FEP in use, it sets the mode, the CCD Id, geometry, into a separate PmCcRaw instance. It also sets up a distinct window list filter and assigns it to the PmCcRaw instance. It then passes the instance to assignFepProcess() to associate the instance with the FEP.
Concurrency:
Guarded

37.6.19 setupWindowFilter()

Protected member of:
SmContClocking
Return Class:
void

Arguments:

FepId fep
FilterWindow& window
Documentation:
This function sets up the window list filter, window. The passed FEP identifier, fep, is a hook to support enhancements which make the grade selection FEP-specific.
Concurrency:
Guarded

37.6.20 stageParameters()

Public member of:
SmContClocking
Return Class:
void

Arguments:

unsigned blockid
Documentation:
This function fetches the Continuous Clocking parameter block, indicated by blockid, and stores its contents into stagedCcBlock. If a window block is referenced within the block, it is fetched and stored into stagedWinBlock.
Concurrency:
Synchronous

37.6.21 terminate()

Public member of:
SmContClocking
Return Class:
void
Documentation:
This function cleans up after a Continuous Clocking science run. It produces and posts a science run report.
Concurrency:
Guarded

37.6.22 useBiasThief()

Public member of:
SmContClocking
Return Class:
Boolean
Documentation:
This function determines whether or not the Bias Thief should be invoked. It returns BoolTrue if the bias thief should send the pixel bias values, and BoolFalse if not.
Concurrency:
Guarded

37.7 Class EventExposure

Documentation:
This class maintains exposure and some science run geometry information, including the scale factors resulting from on-chip pixel summing, the row offset used for sub-array readout, the configured split threshold values, the delta overclock values produced by the FEPs, etc.
Export Control:
Public
Cardinality:
6

Hierarchy:

Superclasses:

none

Implementation Uses:

FEPexpEndRec
FEPexpRec

Public Interface:

Operations:

EventExposure()
copyExpEnd()
copyExpStart()
getExposureNumber()
getGeometry()
getOverclockBase()
getOverclockDelta()
getQuadrant()
getSplitThreshhold()
getThresholdCnt()
mapPosition()
setGeometry()
setSplitThreshold()

Private Interface:

Has-A Relationships:


unsigned grmul: This contains a copy of the row scale factor supplied by setGeometry. This factor is the result of on-chip pixel row summing.

unsigned gcmul: This is a copy of the column scale factor supplied by setGeometry. This factor is the result of on-chip pixel column summing.

unsigned groff: This is a copy of the CCD row offset, supplied by setGeometry. This factor is a result of sub-array readout clocking of the CCD.

Boolean gcpQuad: This flag indicates whether or not to replicate the quadrant overclock values supplied by the FEP. If setGeometry indicates use of all four output nodes, this value is BoolFalse. If it indicates use of only two output nodes, this flag is set to BoolTrue, and overclock 0 reported by the FEP is copied into slots for nodes A and B, and overclock 1 is copied into slots for nodes C and D.

unsigned split[4]: This array contains the configured split thresholds for the run.

unsigned expNum: This variable contains the last reported exposure number.

unsigned expOcBase[4]: This array contains the base overclock values for the run, reported from the FEP.

int expOcDelta[4]: This array contains the last reported delta-overclock values, reported from the FEP.

unsigned expFepTime: This variable contains the last reported FEP timestamp value

unsigned expThresholdCnt: This variable contains the count of pixels above threshold last reported by the FEP.
Concurrency:
Guarded
Persistence:
Transient

37.7.1 EventExposure()

Public member of:
EventExposure
Documentation:
This is the constructor for the EventExposure class. This function sets the instance variables of the class to default values.
Concurrency:
Guarded

37.7.2 copyExpEnd()

Public member of:
EventExposure
Return Class:
void

Arguments:

const FEPexpEndRec* dataptr
Documentation:
This function copies the number of pixels which were above threshold in the completed exposure, from the FEP produced Exposure End record into expThresholdCnt. The passed dataptr points to the FEP produced Exposure End record.
Preconditions:
If exposure start record has not yet been processed using copyExpStart, or if expNum does not match the exposure number in the Exposure End record, this function will report the occurrence to software housekeeping (statistic codes TBD).
Concurrency:
Guarded

37.7.3 copyExpStart()

Public member of:
EventExposure
Return Class:
void

Arguments:

const FEPexpRec* dataptr
Documentation:
This function respectively copies the exposure number, overclock base values, overclock delta values, and FEP timestamp, from the FEP-produced Exposure Start Record pointed to by dataptr, into expNum, expOcBase, expOcDelta, and expFepTime. If an exposure has been started, but an End Record has not been processed, the occurrence is reported to software housekeeping, and the uncompleted exposure's information is overwritten.
Concurrency:
Guarded

37.7.4 getExposureNumber()

Public member of:
EventExposure
Return Class:
unsigned
Documentation:
This function returns the most recently reported exposure number, expNum. An exposure start record must have been processed using copyExpStart, otherwise this function returns the unlikely exposure number 0xffffffff.
Concurrency:
Synchronous

37.7.5 getGeometry()

Public member of:
EventExposure
Return Class:
void

Arguments:

unsigned& rowscale
unsigned& colscale
unsigned& rowoffset
QuadMode& nodeSelect
Documentation:
This function returns the exposure geometry values. Upon return, rowscale and colscale contain the row and column scaling factors, rowoffset contains the CCD row offset, and nodeSelect contains the output node mode selection (Full,Diag,AC,BD).
Concurrency:
Guarded

37.7.6 getOverclockBase()

Public member of:
EventExposure
Return Class:
unsigned

Arguments:

QuadCode node
Documentation:
This function returns the overclock base value for the output node specified by node. An exposure start record must have been processed via copyExpStart, otherwise this function returns 0xffffffff.
Concurrency:
Synchronous

37.7.7 getOverclockDelta()

Public member of:
EventExposure
Return Class:
int

Arguments:

QuadCode node
Documentation:
This function returns the signed delta-overclock value computed for the CCD output node indexed by node. An exposure start record must have been received, otherwise this function returns 0x80000000.
Concurrency:
Synchronous

37.7.8 getQuadrant()

Public member of:
EventExposure
Return Class:
QuadCode

Arguments:

unsigned pixcol
Documentation:
This function maps the pixel column, pixcol, to an output node and returns the node identifier.
Preconditions:
setGeometry must have been called.
Concurrency:
Synchronous

37.7.9 getSplitThreshhold()

Public member of:
EventExposure
Return Class:
unsigned

Arguments:

QuadCode node
Documentation:
This function returns the split threshold associated with the output node, node.
Preconditions:
setSplitThreshold must have been called.
Concurrency:
Synchronous

37.7.10 getThresholdCnt()

Public member of:
EventExposure
Return Class:
unsigned
Documentation:
This function returns the number of pixels above threshold in the last processed exposure. An exposure end must have been processed, using copyExpEnd, otherwise this function returns 0xffffffff.
Concurrency:
Synchronous

37.7.11 mapPosition()

Public member of:
EventExposure
Return Class:
void

Arguments:

unsigned pixrow
unsigned pixcol
unsigned& ccdrow
unsigned& ccdcol
Documentation:
This function maps the clocked pixel position into CCD coordinates. pixrow and pixcol are the clocked pixel row and column values. Upon returning, this function sets ccdrow and ccdcol to the corresponding CCD row and column position.
Preconditions:
setGeometry must have been called.
Concurrency:
Synchronous

37.7.12 setGeometry()

Public member of:
EventExposure
Return Class:
void

Arguments:

unsigned rowscale
unsigned colscale
unsigned rowoffset
QuadMode quadMode
Documentation:
This function stores the run geometry information into this instance, and uses quadMode to determine how to handle overclocks reported by the FEP. rowscale and colscale are the row and column scale factors for the run. rowoffset is the starting offset of the first row clocked out of the CCD. quadMode is the quadrant selection for the run (Full, Diag, AC, or BD).
Concurrency:
Guarded

37.7.13 setSplitThreshold()

Public member of:
EventExposure
Return Class:
void

Arguments:

unsigned nodeA
unsigned nodeB
unsigned nodeC
unsigned nodeD
Documentation:
This function sets the split threshold for each of the CCD output nodes. nodeA, nodeB, nodeC, and nodeD are the threshold values for nodes A, B, C and D respectively. If only two nodes are in use for the run, the values for A and C should be the same, and the values for B and D should be the same.
Concurrency:
Guarded

37.8 Class PhHistogram

Documentation:
This class represents a histogram of pulse heights from one Front End Processor. This class is used to access the histogram data during Back End data processing and telemetry production.
Export Control:
Public
Cardinality:
n

Hierarchy:

Superclasses:

none

Public Uses:

FEPeventRecHist

Public Interface:

Operations:

copyHeader()
getExposureCount()
getExposureEnd()
getExposureStart()
getOverclockMax()
getOverclockMean()
getOverclockMin()
getOverclockVariance()

Private Interface:

Has-A Relationships:


unsigned ocMean[4]: This is a copy of the histogram's overclock mean values.

unsigned ocMin[4]: This is a copy of the minimum overclock levels from each quadrant.

unsigned ocVar[4]: This is a copy of the overclock variance levels from each quadrant.

unsigned ocMax[4]: These are the maximum overclocks from each quadrant.

unsigned expStart: This is the starting exposure number used to compute the histogram.

unsigned expEnd: This is the number of the last exposure used to build the histogram.
Concurrency:
Guarded
Persistence:
Transient

37.8.1 copyHeader()

Public member of:
PhHistogram
Return Class:
void

Arguments:

const FEPeventRecHist* record
QuadMode mode
Documentation:
This function copies the header information into all of its state variables from the histogram record, record. mode indicates which quadrants were used to build the histograms.
Concurrency:
Guarded

37.8.2 getExposureCount()

Public member of:
PhHistogram
Return Class:
unsigned
Documentation:
This function returns the number of exposures actually integrated in the histogram.
NOTE: Currently, this information is not provided in the FEP to BEP histogram record, and this function returns 0. Either add the info to the record, or add a function to set the configured count and assume all exposures were included.
Concurrency:
Guarded

37.8.3 getExposureEnd()

Public member of:
PhHistogram
Return Class:
unsigned
Documentation:
This function returns the exposure number of the last exposure added to the histogram, as specified in the FEP to BEP histogram record, FEPeventRecHist.
Concurrency:
Guarded

37.8.4 getExposureStart()

Public member of:
PhHistogram
Return Class:
unsigned
Documentation:
This function returns the exposure number of the first exposure accumulated into the histogram, as specified in the FEP to BEP histogram record, FEPeventRecHist.
Concurrency:
Guarded

37.8.5 getOverclockMax()

Public member of:
PhHistogram
Return Class:
unsigned

Arguments:

QuadCode quadrant
Documentation:
This function returns the maximum overclock level detected from quadrant, as specified in the FEP to BEP histogram record, FEPeventRecHist.
Concurrency:
Guarded

37.8.6 getOverclockMean()

Public member of:
PhHistogram
Return Class:
unsigned

Arguments:

QuadCode quadrant
Documentation:
This function returns the mean overclock level from quadrant, as specified in the FEP to BEP histogram record, FEPeventRecHist.
Concurrency:
Guarded

37.8.7 getOverclockMin()

Public member of:
PhHistogram
Return Class:
unsigned

Arguments:

QuadCode quadrant
Documentation:
This function returns the minimum overclock level detected from quadrant, as specified in the FEP to BEP histogram record, FEPeventRecHist.
Concurrency:
Guarded

37.8.8 getOverclockVariance()

Public member of:
PhHistogram
Return Class:
unsigned

Arguments:

QuadCode quadrant
Documentation:
This function returns the variance of the overclocks from quadrant, as specified in the FEP to BEP histogram record, FEPeventRecHist.
Concurrency:
Guarded

37.9 Class PixelRow

Documentation:
This class represents a row of raw pixel pulse heights produced by one Front End Processor. This class provides functions to load new pixel data, flag regions to be telemetered or discarded, and to access the pixels within the row.
Export Control:
Public
Cardinality:
n

Hierarchy:

Superclasses:

none

Implementation Uses:

EventExposure

Public Interface:

Operations:

acceptRegion()
attachData()
discardRegion()
getNextSendRegion()
getOverclockPtr()
getPixelPtr()
getRange()
setup()

Protected Interface:

Operations:

flagRegion()

Private Interface:

Has-A Relationships:


unsigned char sendMask[1024]: This is an array of flags indicating the filtered state of a given pixel in the row. Each entry corresponds to one pixel. The codes for this array are not yet assigned, but will reflect at least the following states: Pixel Accepted, Pixel Rejected.

FEPeventRecRaw* recPtr: This is a pointer to the raw data record.

unsigned ccdRow: This is the CCD row position of the raw pixels.

unsigned rmul: This is the row scale factor.

unsigned cmul: This is the column scaling factor.

unsigned maskLimit: this is the scaled mask limit for the row.

unsigned subarrayStart: This is the starting CCD row number for the image.
Concurrency:
Guarded
Persistence:
Transient

37.9.1 acceptRegion()

Public member of:
PixelRow
Return Class:
unsigned

Arguments:

unsigned mincol
unsigned maxcol
Documentation:
This function flags the pixels between mincol and maxcol to be sent to telemetry. mincol and maxcol are expressed in CCD coordinates, rounded up to the nearest clocked pixel. This function returns the number of affected pixels.
Concurrency:
Guarded

37.9.2 attachData()

Public member of:
PixelRow
Return Class:
void

Arguments:

const FEPeventRecRaw* dataptr
Documentation:
This function sets its internal data pointer to the raw record pointed to by dataptr, extracts the row position, converts it to absolute CCD coordinates, and stores the position in ccdrow.
Concurrency:
Guarded

37.9.3 discardRegion()

Public member of:
PixelRow
Return Class:
unsigned

Arguments:

unsigned mincol
unsigned maxcol
Documentation:
This function flags the CCD pixels from mincol to maxcol so they are not sent into telemetry. mincol and maxcol are expressed in CCD coordinates. This function returns the number of affected pixels.
Concurrency:
Guarded

37.9.4 flagRegion()

Protected member of:
PixelRow
Return Class:
unsigned

Arguments:

unsigned mincol
unsigned maxcol
unsigned char flag
Documentation:
This function stores flag into the sendMask[] array slots corresponding to the CCD pixels from mincol to maxcol so they are not sent into telemetry. mincol and maxcol are expressed in CCD coordinates. This function returns the number of affected pixels.
Concurrency:
Guarded

37.9.5 getNextSendRegion()

Public member of:
PixelRow
Return Class:
void

Arguments:

unsigned& start
unsigned& count
Documentation:
This function obtains the next region of the pixel row to be sent to telemetry. On input, start is the starting pixel column position of the last region returned by this function or sent, and count contains the previous region's length. If start and count are zero then this is the first call for the row. Upon returning, start contains the next region of the row to send and count contains the number of pixels to send in the region.
Semantics:
Adjust start by adding count. Scan sendMask until a non-discard code is reached and set start to that point. Continue scanning until a discard code is reached, and set count to the number of pixels in the region.
Concurrency:
Guarded

37.9.6 getOverclockPtr()

Public member of:
PixelRow
Return Class:
const unsigned short*
Documentation:
This function returns a pointer to the overclock pixels in the row (i.e. the address of recPtr>oc).
Concurrency:
Guarded

37.9.7 getPixelPtr()

Public member of:
PixelRow
Return Class:
const unsigned short*

Arguments:

unsigned pixcol
Documentation:
This function returns a pointer to the pixels in the row starting from pixel column pixcol (i.e. the address of recPtr>p[pixcol]).
Concurrency:
Guarded

37.9.8 getRange()

Public member of:
PixelRow
Return Class:
void

Arguments:

unsigned& row
unsigned& mincol
unsigned& maxcol
Documentation:
This function returns the CCD position of the row of raw pixels. It sets row to the CCD row position of the pixels, and mincol and maxcol to the minimum and maximum column positions represented by the array.
Concurrency:
Guarded

37.9.9 setup()

Public member of:
PixelRow
Return Class:
void

Arguments:

const EventExposure* exposure
Documentation:
This function sets up the pixel row, using the information in exposure.
Semantics:
Get the scaling factors, subarray start, and node selection using exposure>getGeometry(), storing the results in rmul, cmul, subarrayStart and nodeSelect. The set the sendMask's limit, maskLimit, by dividing the maximum number of columns in a row (always 1024 for ACIS) by the column summing factor, cmul.
Concurrency:
Guarded

37.10 Class PixelEvent

Documentation:
This abstract class represents an candidate X-ray event, and provides functions to obtain the position, the grade code and the pulse height of the event.
Export Control:
Public
Cardinality:
n

Hierarchy:

Superclasses:

none

Implementation Uses:

EventExposure

Public Interface:

Operations:

PixelEvent()
getCcdPosition()
getGrade()
getPulseHeight()

Protected Interface:

Has-A Relationships:


unsigned vPh: This variable contains the pulse height of the event.

GradeCode vGrade: This variable contains the grade of the event.

Operations:

setup()
correctPixelPh()

Private Interface:

Has-A Relationships:


unsigned ccdrow: This variable contains the event's row position, in CCD-coordinates.

unsigned ccdcol: This value contains the column position of the event, in CCD-coordinates.
Concurrency:
Guarded
Persistence:
Transient

37.10.1 PixelEvent()

Public member of:
PixelEvent
Documentation:
This is the constructor for the PixelEvent class. This function zeros the instance variables of the constructed instance.
Concurrency:
Synchronous

37.10.2 correctPixelPh()

Protected member of:
PixelEvent
Return Class:
int

Arguments:

unsigned pixelPh
unsigned biasPh
int deltaOc
Documentation:
This function computes the corrected pixel pulse height. pixelPh is the raw pixel pulse height, biasPh is the bias value associated with the pixel, and deltaOc is the delta overclock value associated with the pixel. If the bias value is invalid, or if deltaOc is too small, this function will return a negative value.
Concurrency:
Synchronous

37.10.3 getCcdPosition()

Public member of:
PixelEvent
Return Class:
void

Arguments:

unsigned& rowOut
unsigned& colOut
Documentation:
This function returns the CCD pixel position of the center of the event. rowOut is the row (or continuous clocking row count) of the center of the event, and colOut is set to the column position of the center of the event. If the mode was summing rows or columns, the position is scaled to CCD coordinates, but represents the bottom-left corner of the summed pixel grid.
Concurrency:
Guarded

37.10.4 getGrade()

Public member of:
PixelEvent
Return Class:
GradeCode
Documentation:
This function returns the grade code of the 3x3 event.
Concurrency:
Guarded

37.10.5 getPulseHeight()

Public member of:
PixelEvent
Return Class:
unsigned
Documentation:
This function returns the total pulse height (i.e. event amplitude) of a 3x3 event.
Concurrency:
Guarded

37.10.6 setup()

Protected member of:
PixelEvent
Return Class:
void

Arguments:

const ExposureInfo* exposure
unsigned pixrow
unsigned pixcol
Documentation:
This function resets the state of any data dependent internally computed values. exposure points to an exposure record, used to map pixel addresses into CCD positions. pixrow and pixcol are the row and column position of the event in pixel coordinates.
Concurrency:
Guarded

37.11 Class Pixel1x3

Documentation:
This class represents a candidate event produced when in Continuous Clocking Mode, represented as a single row of three adjacent pixels. This class provides functions to load new pixel data, to obtain the bias value associated with a pixel within the event, and to obtain the uncorrected pulse-height of a pixel within the event.
Export Control:
Public
Cardinality:
n

Hierarchy:

Superclasses:

PixelEvent

Public Uses:

EventExposure
FEPeventRec1x3

Public Interface:

Operations:

Pixel1x3()
attachData()
getBias()
getPixel()

Protected Interface:

Operations:

computePhGrade()

Private Interface:

Has-A Relationships:

const FEPeventRec1x3* dataPtr: This is a pointer to the 1x3 event record associated with the instance via attachData().

unsigned pixcol: This is the pixel column position of the event.

unsigned pixrow: This is the pixel row position of the center of the event, relative to the start of the 512 row continuous clocking data set.
Concurrency:
Guarded
Persistence:
Transient

37.11.1 Pixel1x3()

Public member of:
Pixel1x3
Documentation:
This is the constructor for the Pixel1x3 class. This function invokes the parent constructor, PixelEvent(), to zero the instance variables of the constructed instance.
Concurrency:
Synchronous

37.11.2 attachData()

Public member of:
Pixel1x3
Return Class:
void

Arguments:

FEPevent1x3* dataPtr
EventExposure* exposure
Documentation:
This function stores the reference to the FEP record pointed to by dataPtr. This reference is used to obtain the position, pixel and bias information from the FEP record.
Semantics:
The function uses the setup() function to register the CCD row and column position of the event. It then uses exposure>getQuadrant() to determine which quadrant each column position belongs to, and then uses exposure>getOverclockDelta() and exposure>getSplitThreshold() to obtain the delta-overclock levels and split threshold levels for each column. The function then uses computePhGrade() to compute and store the pulse height and spatial distribution grade of the event, passing the overclock and threshold information provided by exposure.
Concurrency:
Guarded

37.11.3 computePhGrade()

Protected member of:
Pixel1x3
Return Class:
void

Arguments:

int doclk[3]
unsigned split[2]
Documentation:
This function computes and stores the pulse height and spatial distribution grade of the event. doclk are the delta-overclock values of the left, center, and right columns of the event. split contains the split thresholds for the left and right columns (center split threshold is not used for a 1x3 event).
Semantics:
This function zeros the vPh and vGrade instance variables. It then uses PixelEvent::correctPixelPh() to get the corrected pulse height of the center pixel and stores the result in vPh. It then uses PixelEvent::correctPixelPh() to get the corrected pulse heights of the left and right events, and compares each against their respective split threshold. If they are greater than or equal to the split threshold, their corrected pulse height is added to vPh, and the grade bit corresponding to the column is added to vGrade.
Concurrency:
Guarded

37.11.4 getBias()

Public member of:
Pixel1x3
Return Class:
unsigned

Arguments:

unsigned column
Documentation:
This function returns the pixel bias value identified by column. The argument column must have one of the following values: 0, 1, or 2.
Concurrency:
Guarded

37.11.5 getPixel()

Public member of:
Pixel1x3
Return Class:
unsigned

Arguments:

unsigned column
Documentation:
This function returns the raw pixel pulse height value identified by column. column must have one of the following values: 0, 1, or 2.
Concurrency:
Guarded

37.12 Class Pixel3x3

Documentation:
This class represents a 3x3 event, produced by a Front End Processor in Timed Exposure Mode. This class provides functions to load new pixel data, to obtain the bias value associated with a pixel within the event, and to obtain the uncorrected pulse-height of a pixel within the event.
Export Control:
Public
Cardinality:
n

Hierarchy:

Superclasses:

PixelEvent

Public Uses:

FEPeventRec3x3

Public Interface:

Operations:

Pixel3x3()
attachData()
getBias()
getPixel()

Protected Interface:

Operations:

computePhGrade()
gradeCornerPixel()
gradeEdgePixel()

Private Interface:

Has-A Relationships:


const FEPeventRec3x3* dataPtr: This is a pointer to the 3x3 event record associated with the instance via attachData().

unsigned pixrow: This is the pixel row of the center of the event.

unsigned pixcol: This is the pixel column of the center of the event.
Concurrency:
Guarded
Persistence:
Transient

37.12.1 Pixel3x3()

Public member of:
Pixel3x3
Documentation:
This is the constructor for the Pixel3x3 class. This function invokes the parent constructor, PixelEvent(), to zero the instance variables of the constructed instance.
Concurrency:
Synchronous

37.12.2 attachData()

Public member of:
Pixel3x3
Return Class:
void

Arguments:

FEPeventRecord3x3* dataptr
EventExposure* exposure
Documentation:
This function copies the event information contained in the record pointed to by dataptr, and computes the CCD position of the event, the pulse height of the event, and the event grade, using geometry, overclock and threshold information provided by exposure.
Semantics:
The function uses the setup() function to register the CCD row and column position of the event. It then uses exposure>getQuadrant() to determine which quadrant each column position belongs to, and then uses exposure>getOverclockDelta() and exposure>getSplitThreshold() to obtain the delta-overclock levels and split threshold levels for each column. The function then uses computePhGrade() to compute and store the pulse height and spatial distribution grade of the event, passing the overclock and threshold information provided by exposure.
Concurrency:
Guarded

37.12.3 computePhGrade()

Protected member of:
Pixel3x3
Return Class:
void

Arguments:

int doclk[3]
unsigned split[3]
Documentation:
This function computes the pulse height and grade of the 3x3 event. doclk contains the delta-overclock values for the left, center, and right columns of the event. split contains the split threshold values for the corresponding columns.
Semantics:
Zeros the grade, PixelEvent::vGrade, set the pulse height, PixelEvent::vPh, to the corrected pulse height of the center pixel (PixelEvent::computePixelPh()). Compute the corrected pulse heights for each of the edge pixels and process the result using gradeEdgePixel(). Then compute the corrected pulse heights for each of the corner pixels and figure their contribution using gradeCornerPixel().
Concurrency:
Guarded

37.12.4 getBias()

Public member of:
Pixel3x3
Return Class:
unsigned

Arguments:

unsigned row
unsigned col
Documentation:
This function returns the pixel bias located at [row][col], where row and col are either 0, 1 or 2.
Concurrency:
Guarded

37.12.5 getPixel()

Public member of:
Pixel3x3
Return Class:
unsigned

Arguments:

unsigned row
unsigned col
Documentation:
This function returns the pulse height of the pixel located at [row][col], where row and col are either 0, 1 or 2.
Concurrency:
Guarded

37.12.6 gradeCornerPixel()

Protected member of:
Pixel3x3
Return Class:
void

Arguments:

int corrected
unsigned threshold
unsigned gradeBit
Boolean phEnabled
Documentation:
This function compares the corrected pixel pulse height, corrected, with the split threshold, threshold. If corrected is greater than threshold, the function sets the bit indexed by gradeBit, into the event's grade code, PixelEvent::vGrade. Also, if phEnabled is BoolTrue (i.e. an adjacent edge pixel is also above split threshold), it adds the corrected pulse height to the total pulse height of the event, PixelEvent::vPh.
Concurrency:
Guarded

37.12.7 gradeEdgePixel()

Protected member of:
Pixel3x3
Return Class:
void

Arguments:

int corrected
unsigned threshold
unsigned gradeBit
Boolean& corner1
Boolean& corner2
Documentation:
This function compares the corrected pixel pulse height, corrected, against the split threshold, threshold. If corrected is greater than or equal to threshold, the function sets the bit, indexed by gradeBit, in the event's grade code, PixelEvent::vGrade, adds the corrected pulse height to the total for the event, PixelEvent::vPh, and sets the two corner pixel flags, corner1 and corner2, to BoolTrue, indicating that either pixel may be considered as part of the event.
Concurrency:
Guarded

37.13 Class Filter

Documentation:
This class is an abstract class which represents a data filter residing on the Back End Processor. This class provides functions to accept and reject data items, and to maintain counts of the accepted and rejected items.
Export Control:
Public
Cardinality:
n

Hierarchy:

Superclasses:

none

Public Interface:

Operations:

Filter()
accept()
getAcceptCnt()
getDiscardCnt()
reject()
resetCounters()

Private Interface:

Has-A Relationships:


unsigned accepted: This variable contains the number of items accepted by the filter since the most recent call to resetCounters. This counter is zeroed by resetCounters, typically once per exposure, and advanced during exposure processing by calls to accept.

unsigned rejected: This variable contains the number of items rejected by the filter since the most recent call to resetCounters. This counter is zeroed by resetCounters, typically once per exposure, and is advanced during exposure processing by calls to reject.
Concurrency:
Guarded
Persistence:
Persistent

37.13.1 Filter()

Public member of:
Filter
Documentation:
This is the constructor for the Filter class. This function zeros the instances accepted and rejected counters.
Concurrency:
Guarded

37.13.2 accept()

Public member of:
Filter
Return Class:
void

Arguments:

unsigned cnt
Documentation:
This function increments the filter's accept counter by an amount specified by cnt.
Concurrency:
Guarded

37.13.3 getAcceptCnt()

Public member of:
Filter
Return Class:
unsigned
Documentation:
This function returns the number of events accepted by the filter since the most recent call to resetCounters.
Concurrency:
Guarded

37.13.4 getDiscardCnt()

Public member of:
Filter
Return Class:
unsigned
Documentation:
This function returns the number of items rejected by the filter since the most recent call to resetCounters.
Concurrency:
Guarded

37.13.5 reject()

Public member of:
Filter
Return Class:
void

Arguments:

unsigned cnt
Documentation:
This function increments the filter's discard counter by the amount specified by cnt.
Concurrency:
Guarded

37.13.6 resetCounters()

Public member of:
Filter
Return Class:
void
Documentation:
This function resets the data element accept and reject counters to 0.
Concurrency:
Guarded

37.14 Class FilterWindow

Documentation:
This class is responsible for filtering events and raw-mode pixel rows based on a collection of windows. This class provides functions to configure a new set of windows, to filter a row of raw pixel data based on the configured windows, and to filter an event on the configured windows.
Export Control:
Public
Cardinality:
6

Hierarchy:

Superclasses:

Filter

Public Uses:

PixelEvent
PixelRow

Public Interface:

Operations:

FilterWindow()
addWindow()
filterEvent()
filterRow()
resetWindows()

Private Interface:

Has-A Relationships:


WindowInfo windows[36]: This is an array of window definition structures. Each structure specifies the bounding box of a 2-D window, the sample limit and pulse height range for the window, and the current sample counter for the window. Each WindowInfo structure contains the following fields:

unsigned minRow: Minimum row position of the window

unsigned maxRow: Maximum row position of window

unsigned minCol: Minimum column position of window

unsigned maxCol: Maximum column position of window

FilterPh phFilter: Pulse height filter used by window

unsigned sample: Sample limit of window

unsigned eventCnt: Number of events currently in sample cycle

unsigned windowCnt: This variable specifies the number of windows being used for the filter.
Concurrency:
Guarded
Persistence:
Persistent

37.14.1 FilterWindow()

Public member of:
FilterWindow
Documentation:
This is the constructor for the FilterWindow class. This function zeros the windowCnt instance variable.
Concurrency:
Guarded

37.14.2 addWindow()

Public member of:
FilterWindow
Return Class:
Boolean

Arguments:

unsigned minRow
unsigned minCol
unsigned nrows
unsigned ncols
unsigned sample
unsigned lowerPh
unsigned phRange
Documentation:
This function adds a window to the filter set. minRow is the minimum CCD row position covered by the window, and minCol is the minimum CCD column covered. nrows is the total number of CCD rows covered by the window, and ncols is the number of columns. (NOTE: To configure a 1-d window, set minRow to 0 and nrows to 1024. If nrows or ncols is 0, then the window will not process any events. If nrows or ncols is greater than 1024, the offending value will be clipped, and set to 1024). When sample is greater than zero, its value minus 1 is the number of events to skip for each event produced by the window. If sample is 0, then all events are discarded by the window. lowerPh is the lowest event pulse height accepted by the window, and phRange is the number of pulse heights above lowerPh accepted by the window (i.e. an event must have pulse height greater than or equal to lowerPh and less than lowerPh + phRange). (NOTE: If phRange is 0, or lowerPh is greater than the maximum event pulse height (~73K), then all intersecting events will be rejected by the window).This function copies this information into the windows element indexed by windowCnt, and increments windowCnt. If there are no WindowInfo structures remaining at the time of the call, this function returns BoolFalse, otherwise it returns BoolTrue.
Concurrency:
Guarded

37.14.3 resetWindows()

Public member of:
FilterWindow
Return Class:
void
Documentation:
This function resets the windowCnt index to 0, eliminating all windows added by addWindow().
Concurrency:
Guarded

37.14.4 filterEvent()

Public member of:
FilterWindow
Return Class:
Boolean

Arguments:

PixelEvent& event
Documentation:
This function filters the pixel event referenced by event. If the event is accepted for further processing, this function returns BoolTrue. If the event is rejected, the function returns BoolFalse.
Semantics:
Get the position and pulse height of the event using event.getCcdPosition() and event.getPulseHeight(). For each window in windows[] (up to windowCnt), compare the position to the row and column ranges of the window. If the position is not within the limits of the window, check the next window. If no window handles the event, accept the event. If the position is within a window's limits, check the sample counter of the window. If the counter is at its limit, check the pulse height range of the window against the event. If the pulse height is in range, accept the event, and increment the sample counter. If the sample counter is not at its limit, or the pulse height is not within the acceptable range, reject the event.
Concurrency:
Guarded

37.14.5 filterRow()

Public member of:
FilterWindow
Return Class:
Boolean

Arguments:

PixelRow& pixelRow
Documentation:
This function filters and clips the row of raw pixel pulse heights, referenced by pixelRow.
Semantics:
Initially, all pixels in pixelRow should be flagged to be sent to telemetry. For every window, working backwards in the windows[] array, determine the intersection of the row of pixels with a given window. If the row intersects the window, use the window's configured sample limit to determine if the window accepts or rejects the intersecting region. If the sample limit is not 0, then use pixelRow.discardRegion() to flag the intersecting pixels to be clipped out of the final telemetered image. If the sample limit is 0, then use pixelRow.acceptRegion() to flag the intersecting pixels to be sent. Subsequent windows may or may not override certain pixel flags with subsequent calls to acceptRegion() or discardRegion(). The last window which touches a given pixel determines the final send/don't send decision of that pixel.
Concurrency:
Guarded

37.15 Class FilterGrade

Documentation:
This class is responsible for filtering events based on their grade code. This class handles grade codes which can range from 0 to 255. This range encompasses both Timed Exposure and Continuous Clocking grade code ranges and is used for both modes.
Export Control:
Public
Cardinality:
6

Hierarchy:

Superclasses:

Filter

Public Uses:

PixelEvent

Public Interface:

Operations:

allow()
disableAll()
filterEvent()

Private Interface:

Has-A Relationships:


unsigned char grades[32]: This array contains one bit-element for each possible grade code (in a 3x3 event), and is indexed by grade code. If an element is `0', then events with the corresponding grade code are to be rejected. If the element is `1', then the event is accepted for further processing.
Concurrency:
Guarded
Persistence:
Transient

37.15.1 allow()

Public member of:
FilterGrade
Return Class:
void

Arguments:

GradeCode code
Documentation:
This function causes the filter to accept events with the grade code specified by code (i.e. sets grade[code] to BoolTrue).
Concurrency:
Guarded

37.15.2 disableAll()

Public member of:
FilterGrade
Return Class:
void
Documentation:
This function causes all grade codes to be rejected (i.e. sets the contents of the grade array to BoolFalse).
Concurrency:
Guarded

37.15.3 filterEvent()

Public member of:
FilterGrade
Return Class:
Boolean

Arguments:

PixelEvent& event
Documentation:
This function filters an event based on its grade code. The function calls event.getGrade() to obtain the grade code of the event. If the indexed flag in grade[] is BoolTrue, the event is accepted and the function returns BoolTrue, else it is rejected and the function returns BoolFalse.
Concurrency:
Guarded

37.16 Class FilterPh

Documentation:
This class is responsible for filtering events based on their total pulse height. This class provides functions to configure the pulse height limits of the filter, and to filter events based on the configured limits.
Export Control:
Public
Cardinality:
n

Hierarchy:

Superclasses:

Filter

Public Uses:

PixelEvent

Public Interface:

Operations:

filterEvent()
setLimits()

Private Interface:

Has-A Relationships:


unsigned lowerLimit: This is the lowest event pulse height accepted by the filter.

unsigned upperLimit: This is the largest event pulse height accepted by the filter.
Concurrency:
Guarded
Persistence:
Transient

37.16.1 filterEvent()

Public member of:
FilterPh
Return Class:
Boolean

Arguments:

PixelEvent& event
Documentation:
This function filters the pixel event, indicated by event, based on its total pulse height. If the event's pulse height is outside the configured limits of the filter, the event is rejected, and this function returns BoolFalse. If the event's pulse height is within the filter's limits, the event is accepted, and the function returns BoolTrue.
Concurrency:
Guarded

37.16.2 setLimits()

Public member of:
FilterPh
Return Class:
void

Arguments:

unsigned lowerBound
unsigned range
Documentation:
This function sets the lower and upper pulse height limits of the filter. Events whose energy is greater than or equal to lowerBound, and less than lowerBound + range are accepted. All others are rejected.
Concurrency:
Guarded

37.17 Class PmEvent

Documentation:
This class represents a generic event processor, whose responsibility is to parse records produced by a FEP, and produce data packets and exposure records. This class implements common functions used by all event processor types.
Export Control:
Public
Cardinality:
n

Hierarchy:

Superclasses:

ProcessMode

Implementation Uses:

FEPexpRec
FEPexpEndRec
FEPerrorRec
Tf_Record_Event

Public Interface:

Operations:

PmEvent()
finishExposure()
processRecord()
setGradeFilter()
setPhFilter()
setWindowFilter()

Protected Interface:

Has-A Relationships:


FilterPh* phFilter: This is a pointer to the pulse-height filter for the event processor. It is installed by the client using setPhFilter, and is configured directly by the client when setting up the science run.

FilterWindow* windowFilter: This is a pointer to the window list filter for this event processor. It is installed by the client using setWindowFilter, and is configured directly by the client when setting up the science run.

FilterGrade* gradeFilter: This is a pointer to the event grade filter for the event processor. It is set by the client using setGradeFilter, and is configured directly by the client code.

Operations:

digestBiasError()
filterEvent()
incEventCnt()
setupExposureRecord()

Private Interface:

Has-A Relationships:


unsigned parityErrCnt: This variable contains the total number of bias map parity errors since the start of the run. This count is set to zero at the start of the run, and is advanced by calls to digestBiasError.

unsigned packedEvents: This variable contains the total number of events sent by this exposure. This counter is advanced by calls to incEventCnt.

Tf_Data_Bias_Error biasErrForm: This is a bias error telemetry packet form responsible for sending bias map parity errors to telemetry.
Concurrency:
Guarded
Persistence:
Persistent

37.17.1 PmEvent()

Public member of:
PmEvent
Documentation:
This is the constructor for the PmEvent class. This function sets the instance variables of the class to default values.
Concurrency:
Guarded

37.17.2 digestBiasError()

Protected member of:
PmEvent
Return Class:
Boolean

Arguments:

FEPerrorRec* record
Documentation:
This function handles a bias error record produced by the FEP. record points to copy of the bias error record. If successful, this function returns BoolTrue. If the mode is aborted, or an error occurs, the function returns BoolFalse.
Semantics:
If biasErrForm does not have a buffer, use waitForPkt() to obtain a telemetry packet buffer for the error. Once a buffer is obtained, store the start time, parameter block id and CCD and FEP ids into the buffer (see ProcessMode::getTimeBias() and getRunIdInfo()). Append the error row and column to the buffer using biasErrForm.append_Bias_Errors(). If the buffer is full, post it to telemetry using biasErrForm.post().
Concurrency:
Guarded

37.17.3 filterEvent()

Protected member of:
PmEvent
Return Class:
Boolean

Arguments:

PixelEvent& event
Documentation:
This function runs event through the process mode's collection of event filters. If the event is accepted by the filter set, the function returns BoolTrue. If the event has been rejected, it returns BoolFalse. In order for the window event sampling to be based on desired events (i.e. events with the appropriate pulse height, grade and position), the window filter must always be applied AFTER all other filters.
Preconditions:
phFilter, windowFilter and gradeFilter must be configured and ready to process data.
Semantics:
Apply event to phFilter. If accepted, try gradeFilter. If still accepted, try windowFilter. Return BoolTrue if all filters accept the event, and BoolFalse if any of the filters reject the event.
Concurrency:
Guarded

37.17.4 finishExposure()

Public member of:
PmEvent
Return Class:
Boolean
Documentation:
This is an abstract function which must be implemented by each subclass. The function must complete the current exposure, given the mode implementing the function. If successful, the function returns BoolTrue. If the run is aborted, or has a fatal error, the function returns BoolFalse.
Concurrency:
Guarded

37.17.5 incEventCnt()

Protected member of:
PmEvent
Return Class:
void
Documentation:
This function increments the telemetered event count for the exposure.
Concurrency:
Guarded

37.17.6 processRecord()

Public member of:
PmEvent
Return Class:
Boolean

Arguments:

const RINGREC& record
Documentation:
This function parses the FEP-produced record contained within record. Typically, subclasses of this class overload processRecord, handling their own record types and calling this function only if the subclass does not recognize the record type. For example, PmTeFaint3x3's processRecord function will handle FEP_EVENT_REC_3x3 record type tags, but pass all other record types to this function. This function recognizes the following record type tags:
FEP_EXPOSURE_REC (FEPexpRec) FEP_EXPOSURE_END_REC (FEPexpEndRec) FEP_ERR_REC (FEPerrRec) TBD: FEP_FID_REC
Semantics:
If the record type is FEP_EXPOSURE_REC, copy the record information into the exposure information instance using expInfo.copyExpStart(). Zero packedEvents and parityErrors, and use phFilter.resetCnt(), windowFilter.resetCnt(), and gradeFilter.resetCnt() to reset the filter counters.
If the record type is FEP_EXPOSURE_END_REC, use expInfo.copyExpEnd() to load exposure end information into the instance. If biasErrForm has data, post it to telemetry using biasErrForm.post(). Then use finishExposure() to post the exposure record and perform processing mode specific cleanup actions.
If the record type is FEP_ERR_REC, use digestBiasError() to add the bias map parity error the information to the current bias error data telemetry packet.
Concurrency:
Guarded

37.17.7 setGradeFilter()

Public member of:
PmEvent
Return Class:
void

Arguments:

FilterGrade* gradefilt
Documentation:
This function assigns the grade filter, gradefilt, to this process instance. If gradefilt is 0, no grade filtering is done by this instance.
Concurrency:
Guarded

37.17.8 setPhFilter()

Public member of:
PmEvent
Return Class:
void

Arguments:

FilterPh* phfilt
Documentation:
This function sets the pulse height filter, phfilt, for use by this instance. If phfilt is 0, then no global pulse height filtering is done by this instance.
Concurrency:
Guarded

37.17.9 setWindowFilter()

Public member of:
PmEvent
Return Class:
void

Arguments:

FilterWindow* windowfilt
Documentation:
This function sets the window filter, windowfilt, to this instance. If windowfilt is 0, then this instance performs no window filtering.
Concurrency:
Guarded

37.17.10 setupExposureRecord()

Protected member of:
PmEvent
Return Class:
Boolean

Arguments:

Tf_Record_Event& form
Documentation:
This function prepares the exposure record telemetry object, form, to accumulate event data.
Concurrency:
Guarded

37.18 Class PmHist

Documentation:
This class is responsible for processing histogram data accumulated over a series of exposures by the Front End Processor.
Export Control:
Public
Cardinality:
n

Hierarchy:

Superclasses:

ProcessMode

Public Interface:

Operations:

PmHist()
getQuadMode()
processRecord()
setQuadMode()

Protected Interface:

Operations:

finishExposure()

Private Interface:

Has-A Relationships:


QuadMode quadmode: This is the output register mode being used to produce the histograms.
Concurrency:
Guarded
Persistence:
Transient

37.18.1 PmHist()

Public member of:
PmHist
Documentation:
This is the constructor for the PmHist class. This function sets the instance variables of the class to default values.
Concurrency:
Guarded

37.18.2 finishExposure()

Protected member of:
PmHist
Return Class:
Boolean
Documentation:
This function ends the current histogram. Each subclass must implement this function.
Concurrency:
Guarded

37.18.3 getQuadMode()

Public member of:
PmHist
Return Class:
QuadMode
Documentation:
This function returns the quadrant mode being used to produce the histograms.
Concurrency:
Guarded

37.18.4 processRecord()

Public member of:
PmHist
Return Class:
Boolean

Arguments:

const RINGREC& record
Documentation:
This function is responsible for processing a FEP to BEP ring-buffer record. If successful, the function returns BoolTrue. If the run is aborted, the function returns BoolFalse. This function recognizes the following record type tags:
FEP_EXPOSURE_REC (FEPexpRec) FEP_EXPOSURE_END_REC (FEPexpEndRec)
Semantics:
Switch on the record type. If the record indicates the start of an exposure, use load the information into the exposure record using expInfo.copyExpStart(). If the record delimits the end of the histogram exposures, copy the closure information using expInfo.copyExpEnd() and then tell the subclass to finish of the histogram, using finishExposure().
Concurrency:
Guarded

37.18.5 setQuadMode()

Public member of:
PmHist
Return Class:
void

Arguments:

QuadMode mode
Documentation:
This function sets the quadrant mode, indicated by mode, being used to produce the histograms.
Concurrency:
Guarded

37.19 Class PmRaw

Documentation:
This class is responsible for processing raw pixels produced by a single Front End Processor.
Export Control:
Public
Cardinality:
n

Hierarchy:

Superclasses:

ProcessMode

Public Uses:

PixelRow

Implementation Uses:

HuffmanMap

Public Interface:

Operations:

PmRaw()
getCompression()
getOverclockCnt()
processRecord()
setCompression()
setOverclockCnt()
setWindowFilter()

Protected Interface:

Operations:

accumulateRawRecord()
filterRow()
finishExposure()
getRawRecord()
packRow()

Private Interface:

Has-A Relationships:


FilterWindow* windowFilter: This is a pointer to the window filters to use to clip raw image data.

HuffmanTable rawHuffman: This is the compression table to use when compression raw mode data.

FEPeventRecRaw accumulator: This field is used to accumulate a single FEP raw mode record from a series of 32-bit FEP to BEP ring-buffer records.

unsigned remaining: This is the number of 32-bit words remaining to acquire before the raw mode record is complete.

unsigned compressCode: This is a copy of the compression table code, set by setCompression().

unsigned overclocks: This is the total number of overclock pixels in each raw row.

unsigned* accumPtr: This is points to the next location to append to.
Concurrency:
Guarded
Persistence:
Transient

37.19.1 PmRaw()

Public member of:
PmRaw
Documentation:
This is the constructor for the PmRaw class. This function sets the instance variables of the class to default values.
Concurrency:
Guarded

37.19.2 accumulateRawRecord()

Protected member of:
PmRaw
Return Class:
Boolean

Arguments:

const RINGREC& record
Boolean start
Documentation:
This function appends the passed FEP to BEP record's data to the accumulated raw record structure (of type FEPeventRecRaw). If start is BoolTrue, it indicates that this is the first record to accumulate. If start is BoolFalse, then the passed record is to be appended to an already started raw row. The function returns BoolTrue once the raw record is complete, and BoolFalse if the record remains incomplete.
Concurrency:
Guarded

37.19.3 filterRow()

Protected member of:
PmRaw
Return Class:
void

Arguments:

PixelRow& row
Documentation:
This function runs the row record, row, through the window list clipping filter, windowFilter.
Concurrency:
Guarded

37.19.4 finishExposure()

Protected member of:
PmRaw
Return Class:
Boolean
Documentation:
This function completes the current exposure. The function returns BoolTrue if successful, and BoolFalse if the run has been aborted. All subclasses of this class must implement this function.
Concurrency:
Guarded

37.19.5 getCompression()

Public member of:
PmRaw
Return Class:
unsigned
Documentation:
This function returns the compression table code used to pack data.
Concurrency:
Guarded

37.19.6 getOverclockCnt()

Public member of:
PmRaw
Return Class:
unsigned
Documentation:
This function returns the total number of overclock pixels in each row.
Concurrency:
Guarded

37.19.7 getRawRecord()

Protected member of:
PmRaw
Return Class:
FEPeventRecRaw*
Documentation:
This function returns a pointer to the completed raw mode record.
Concurrency:
Guarded

37.19.8 packRow()

Protected member of:
PmRaw
Return Class:
Boolean

Arguments:

const PixelRow& row
unsigned*& dstptr
unsigned& dstlen
Boolean& partial
unsigned& pixels
Documentation:
This function uses the Huffman compression instance, rawHuffman, to pack the row's data contained in row, into the destination buffer pointed to by dstptr. The destination buffer contains at least dstlen 32-bit words. Upon returning, dstptr points to the next location to pack to, and dstlen contains the number of words remaining in the destination buffer. If partial contains BoolTrue, then the last word in the buffer was partially filled, and is not reflected in dstptr and dstlen. pixels will contain the count of pixels packed into the output buffer. If the destination buffer spilled, the write is aborted, and the function returns BoolFalse. If the write is complete, then the function returns BoolTrue.
Preconditions:
This function assumes that the row has been filtered.
Concurrency:
Guarded

37.19.9 processRecord()

Public member of:
PmRaw
Return Class:
Boolean

Arguments:

const RINGREC& record
Documentation:
This function processes a single FEP to BEP data record, record. It returns BoolTrue if the run is to be continued, and BoolFalse if the run has been aborted. This function recognizes the following record type tags:
FEP_EXPOSURE_REC (FEPexpRec) FEP_EXPOSURE_END_REC (FEPexpEndRec)
Concurrency:
Guarded

37.19.10 setCompression()

Public member of:
PmRaw
Return Class:
void

Arguments:

unsigned code
Documentation:
This function sets the compression table, indicated by code, to use when packing raw mode data.
Concurrency:
Guarded

37.19.11 setOverclockCnt()

Public member of:
PmRaw
Return Class:
void

Arguments:

unsigned pixels
Documentation:
This function sets the total number of overclock pixels in each raw row to the value contained in pixels.
Concurrency:
Guarded

37.19.12 setWindowFilter()

Public member of:
PmRaw
Return Class:
void

Arguments:

FilterWindow* windows
Documentation:
This function configures the raw data process to use the window filters pointed to by windows.
Concurrency:
Guarded

37.20 Class PmTeHist

Documentation:
This class is responsible for processing Timed Exposure Histograms.
Export Control:
Public
Cardinality:
6

Hierarchy:

Superclasses:

PmHist

Implementation Uses:

Tf_Record_Te_Histogram
FEPeventRecHist

Public Interface:

Operations:

PmTeHist()
processRecord()

Protected Interface:

Operations:

finishExposure()
finishQuadrant()
isEndOfHistogram()
sendBins()
setupDataPkt()

Private Interface:

Has-A Relationships:


Tf_Data_Te_Hist histForm: This is the telemetry packet builder for Timed Exposure histograms.

QuadCode curQuadrant: This identifies which quadrant's histogram is currently being processed.

unsigned curBin: This identifies the current bin number of the histogram being processed.

Boolean sending: This indicates that the mode is acquiring and packing telemetry bins. BoolTrue indicates that a histogram is being processed, and BoolFalse indicates that no histograms are being processed.

unsigned* packPtr: This points to the next telemetry buffer location to store histogram bins.

unsigned packCount: This specifies the number of bins remaining to store into the current packet.

unsigned packWritten: This is the total number of bins written into the current buffer.

PhHistogram histogram: This is a histogram instance, used to maintain the header information.

unsigned packetNum: This is the current packet number built for the current histogram.
Concurrency:
Guarded
Persistence:
Persistent

37.20.1 PmTeHist()

Public member of:
PmTeHist
Documentation:
This is the constructor for the PmTeHist class. This function sets the instance variables of the class to default values.
Concurrency:
Guarded

37.20.2 finishExposure()

Protected member of:
PmTeHist
Return Class:
Boolean
Documentation:
This function completes the current histogram and issues a histogram report. If successful, the function returns BoolTrue. If the run is aborted, it returns BoolFalse.
NOTE: Since closure of Timed Exposure histograms is handled as the quadrant histograms are read from the FEP, this function is acting as a hook, and currently only returns BoolTrue.
Concurrency:
Guarded

37.20.3 finishQuadrant()

Protected member of:
PmTeHist
Return Class:
Boolean
Documentation:
This function flushes the last data packet of the current quadrant, and forms and issues the histogram record for the quadrant. It then advances curQuadrant to the next quadrant to process. If successful, the function returns BoolTrue. If the run is aborted, it returns BoolFalse.
Semantics:
Detect if histForm has an un-sent buffer using histForm.hasBuffer(). If so, set the final word count and post it to telemetry. Declare a local record form and get a telemetry packet buffer using waitForPkt(). If the wait is aborted, return BoolFalse. If a buffer is obtained, then set each field in the packet buffer and post the buffer. Then determine the next quadrant expected from the FEP, update curQuadrant, zero curBin and return BoolTrue.
Concurrency:
Guarded

37.20.4 isEndOfHistogram()

Protected member of:
PmTeHist
Return Class:
Boolean
Documentation:
This function indicates if the entire histogram has been processed. If it returns BoolFalse, there are more histogram bins to process. If it returns BoolTrue, then all histogram bins have been handled.
Semantics:
If curBin is greater than or equal to the number of bins in a quadrant (4096) and curQuadrant corresponds to the last quadrant (node C if in AC mode, and node D in all other modes), then the histogram is complete, otherwise there are more bins to read.
Concurrency:
Guarded

37.20.5 processRecord()

Public member of:
PmTeHist
Return Class:
Boolean

Arguments:

const RINGREC& record
Documentation:
This function processes the FEP to BEP ring-buffer record, record. If successful, the function returns BoolTrue. If the run is aborted, it returns BoolFalse. This function consumes records of type FEPeventRecHist, and forwards all others to its parent class, PmHist::processRecord().
Semantics:
If already in the process of sending a histogram (sending == BoolTrue), pass the entire record to sendBins(). If not yet sending a histogram, and the record type indicates the first record of the histogram, copy the header into histogram, zero curBin, initialize curQuadrant to the first node in use, and pass the initial bin values to sendBins(). If not sending a histogram, and the record is not the start of a histogram, let the parent handle it by passing the record to PmHist::processRecord().
Concurrency:
Guarded

37.20.6 sendBins()

Protected member of:
PmTeHist
Return Class:
Boolean

Arguments:

const unsigned* binptr
unsigned bincount
Documentation:
This function packs and telemeters the histogram bins pointed to by binptr. The number of bins is specified by bincount. If successful, the function returns BoolTrue. If the run is aborted, return BoolFalse.
Semantics:
If the histogram is complete (isEndOfHistogram() == BoolTrue), set sending to BoolFalse and return. If not, enter a loop which terminates when the entire input buffer has been processed, or when the histogram is complete. On each iteration, use setupDataPkt() to ensure that the data packet has a telemetry packet buffer. Then copy the bin values into the telemetry packet. If the packet fills, set the number of bin values written, and post the packet to telemetry. If the packet completed a quadrant's histogram (curBin >= 4096), call finishQuadrant() to issue a report for the quadrant's histogram.
Concurrency:
Guarded

37.20.7 setupDataPkt()

Protected member of:
PmTeHist
Return Class:
Boolean
Documentation:
This function sets up the data packet, histForm. If successful, the function returns BoolTrue. If the run is aborted, the function returns BoolFalse.
Semantics:
Use histForm.hasBuffer() to determine if histForm has a buffer. If not, use waitForPkt() to allocate a buffer to the form. If the run is aborted while waiting, return BoolFalse. Once a buffer is obtained, set the header information in the packet buffer. Then set packPtr to the start of the bin data area within the packet, and packCount to the number of words available in the buffer. Zero packWritten. If packCount holds more values than are remaining for the current quadrant (curBin + packCount > bins/quadrant (i.e. 4096)), truncate packCount to match the number of remaining bins.
Concurrency:
Guarded

37.21 Class PmTeRaw

Documentation:
This class processes raw Timed Exposure Mode data.
Export Control:
Public
Cardinality:
6

Hierarchy:

Superclasses:

PmRaw

Implementation Uses:

FEPeventRecRaw
Tf_Record_Te_Raw

Public Interface:

Operations:

PmTeRaw()
processRecord()

Protected Interface:

Operations:

finishExposure()
digestRawRecord()
setupDataPkt()

Private Interface:

Has-A Relationships:


Tf_Data_Te_Raw rawForm: This is the Timed Exposure Raw Mode data packet.

unsigned rowsPacked: This indicates the number of raw rows packed into the data packet.

Boolean accumulating: This indicates whether or not the mode is accumulating FEP to BEP records into a single record. BoolFalse indicates that a raw data record is not being accumulated. BoolTrue indicates that the data record is being accumulated.

unsigned* packPtr: This is the current position in the data packet where the next row is to be packed.

unsigned packLen: This is the space remaining in the telemetry packet buffer.

unsigned packWritten: This is the total number of words currently written into the telemetry packet buffer.

Boolean packPartial: This indicates that the last write to the telemetry packet buffer left a partially written word at the end of the packet. If this is BoolTrue at the point at which the buffer is to be sent, packWritten should be advanced by 1 to include the last word in the buffer.

unsigned packPixels: This is the total number of pixels packed into telemetry for the current exposure.

unsigned packetNum: This is the current number of data packets sent so far in the exposure.
Concurrency:
Guarded
Persistence:
Transient

37.21.1 PmTeRaw()

Public member of:
PmTeRaw
Documentation:
This is the constructor for the PmTeRaw class. This function sets the instance variables of the class to default values.
Concurrency:
Guarded

37.21.2 digestRawRecord()

Protected member of:
PmTeRaw
Return Class:
Boolean

Arguments:

FEPeventRecRaw* record
Documentation:
This function processes the raw mode record, record. If successful, the function returns BoolTrue. If the run is aborted, it returns BoolFalse.
Semantics:
Declare a PixelRow instance, row, invoke setup() and attachData() to associate the row instance with the passed record. Call PmRaw::filterRow() to apply the clipping windows. Then use setupDataPkt() to ensure that rawForm has a telemetry packet buffer. Call PmRaw::packRow() to pack the row into the telemetry packet. If the row doesn't fit into the buffer, post the current buffer to telemetry. Then call setupDataPkt() to assign a new telemetry packet buffer, and call packRow() again to load the row into the new buffer. Once the row has been packed, advance packPixels and packWritten by the number of pixels copied and the number of words written into the buffer, respectively.
Concurrency:
Guarded

37.21.3 finishExposure()

Protected member of:
PmTeRaw
Return Class:
Boolean
Documentation:
This function ends the current exposure for Timed Exposure Raw mode. If successful, this function returns BoolTrue. If the run is aborted, it returns BoolFalse.
Semantics:
If rawForm has an un-sent data buffer, post the remaining data packet using rawForm.post(). Declare a raw mode record and obtain a telemetry packet buffer using waitForPkt(). Set the various fields in the packet buffer, and post it to telemetry. If the run is aborted while waiting for a packet buffer, return BoolFalse. If not, return BoolTrue.
Concurrency:
Guarded

37.21.4 processRecord()

Public member of:
PmTeRaw
Return Class:
Boolean

Arguments:

const RINGREC& record
Documentation:
This function processes the FEP to BEP record contained in record. If successful, the function returns BoolTrue. If the run is aborted, it returns BoolFalse.
Semantics:
If in the process of accumulating a raw mode record from the FEP (accumulating == BoolTrue), call accumulateRawRecord(). If the record completes, set accumulating to BoolFalse and call digestRawRecord() to process the completed row. If not in the process of accumulating a record, and the record type indicates the start of a row record, call accumulateRawRecord() to start the accumulation. If not processing a raw mode record, let the parent handle the record using PmRaw::processRecord().
Concurrency:
Guarded

37.21.5 setupDataPkt()

Protected member of:
PmTeRaw
Return Class:
Boolean

Arguments:

PixelRow& row
Documentation:
This function acquires a telemetry packet buffer for the data packet, rawForm, and initializes the header fields in the data packet. row is the first row to attempt to be packed into the telemetry packet buffer.
Semantics:
If rawForm does not have a buffer, use waitForPkt() to obtain a buffer for the form. If the run is aborted while waiting, return BoolFalse. Once a buffer is obtained set the fields in the packet header, using row.getRange() to get the row number. Set packPtr to the data area of the packet buffer and packLen to the number of data words available. Zero packWritten.
Concurrency:
Guarded

37.22 Class PmTeFaint3x3

Documentation:
This class is responsible for processing 3x3 Timed Exposure Events, and producing Faint Mode telemetry data. This class provides functions to Front End Processor event data records, to pack and post to telemetry Faint Mode 3x3 events, and to produce Faint Mode exposure records.
Export Control:
Public
Cardinality:
6

Hierarchy:

Superclasses:

PmEvent

Implementation Uses:

Tf_Record_Te_Faint
FEPeventRec3x3
Pixel3x3

Public Interface:

Operations:

PmTeFaint3x3()
processRecord()

Protected Interface:

Operations:

finishExposure()
sendEvent()

Private Interface:

Has-A Relationships:


Tf_Data_Te_Faint dataForm: This is the telemetry builder used by the mode to accumulate and format 3x3 event pixel data.

unsigned packetNum: This is the data packet number for the current exposure.
Concurrency:
Guarded
Persistence:
Persistent

37.22.1 PmTeFaint3x3()

Public member of:
PmTeFaint3x3
Documentation:
This is the constructor for the PmTeFaint3x3 class. This function sets the instance variables of the class to default values.
Concurrency:
Guarded

37.22.2 finishExposure()

Protected member of:
PmTeFaint3x3
Return Class:
Boolean
Documentation:
This function completes the current exposure, forming and sending an exposure record. It returns BoolTrue on success, and BoolFalse on error or abort request.
Semantics:
Check dataForm.hasBuffer() and if the packet buffer has data, post it. Declare an exposure record form and call PmEvent::setupExposureRecord() to obtain its telemetry buffer and store common exposure record information into the buffer. The call form.post() to queue the packet buffer to telemetry.
Concurrency:
Guarded

37.22.3 processRecord()

Public member of:
PmTeFaint3x3
Return Class:
Boolean

Arguments:

const RINGREC& record
Documentation:
This function processes a record produced by the FEP, contained within record. This function explicitly handles the following record tag types:
FEP_EVENT_REC_3x3 (FEPeventRec3x3)
It uses its parent's member function, PmEvent::processRecord() to handle all other record types. This function returns BoolTrue if the record was processed, and BoolFalse on an error or abort request.
Semantics:
Check the first record tag for FEP_EVENT_REC_3x3. If it is not this type, call PmEvent::processRecord() to attempt to handle the record. If the record type matches, declare Pixel3x3 instance, and pass it expInfo, and a pointer to the record to Pixel3x3::attachData(). expInfo supplies the new event with the configured split threshold levels and exposure overclock levels, and coverts the event's pixel position to absolute CCD coordinates. Then call PmEvent::filterEvent(). If filterEvent() accepts the event, call sendEvent() to pack it into the data buffer.
Concurrency:
Guarded

37.22.4 sendEvent()

Protected member of:
PmTeFaint3x3
Return Class:
Boolean

Arguments:

Pixel3x3& event
Documentation:
This function processes an accepted event, indicated by event, produced by the FEP, storing the event into dataForm's telemetry buffer, and posting dataForm's buffer when and if it becomes full. This function returns BoolTrue if the event was processed, and BoolFalse on an error or abort request.
Semantics:
If dataForm does not already have a packet buffer, call waitForPkt() to obtain a telemetry packet, and set the header information in the packet. If the run is aborted while waiting for a packet, return BoolFalse. Use the passed event to get the CCD position of the event, and the event's raw pulse height values and append them to the current telemetry packet. Increment the mode's event counter using PixelEvent::incEventCnt(). If the telemetry buffer is full, post it to telemetry.
Concurrency:
Guarded

37.23 Class PmTeFaintBias3x3

Documentation:
This class is responsible for processing 3x3 Timed Exposure Events, and producing Faint-with-Bias Mode telemetry data. This class provides functions to Front End Processor event data records, to pack and post to telemetry Faint Mode 3x3 events, and to produce Faint-with-Bias Mode exposure records.
Export Control:
Public
Cardinality:
6

Hierarchy:

Superclasses:

PmEvent

Implementation Uses:

Tf_Record_Te_Faint_Bias
FEPeventRec3x3
Pixel3x3

Public Interface:

Operations:

PmTeFaintBias3x3()
processRecord()

Protected Interface:

Operations:

finishExposure()
sendEvent()

Private Interface:

Has-A Relationships:


Tf_Data_Te_Faint_Bias dataForm: This is the telemetry builder used by the mode to accumulate and format 3x3 event pixel and bias data.

unsigned packetNum: This is the data packet number for the current exposure.
Concurrency:
Guarded
Persistence:
Persistent

37.23.1 PmTeFaintBias3x3()

Public member of:
PmTeFaintBias3x3
Documentation:
This is the constructor for the PmTeFaintBias3x3 class. This function sets the instance variables of the class to default values.
Concurrency:
Guarded

37.23.2 finishExposure()

Protected member of:
PmTeFaintBias3x3
Return Class:
Boolean
Documentation:
This function completes the current exposure, forming and sending an exposure record. It returns BoolTrue on success, and BoolFalse on error or abort request.
Semantics:
Check dataForm.hasBuffer() and if the packet buffer has data, post it. Declare an exposure record form and call PmEvent::setupExposureRecord() to obtain its telemetry buffer and store common exposure record information into the buffer. Then add the bias offsets to the exposure record post the packet buffer to telemetry.
Concurrency:
Guarded

37.23.3 processRecord()

Public member of:
PmTeFaintBias3x3
Return Class:
Boolean

Arguments:

const RINGREC& record
Documentation:
This function processes a record produced by the FEP, contained within record. This function explicitly handles the following record tag types:
FEP_EVENT_REC_3x3 (FEPeventRec3x3)
It uses its parent's member function, PmEvent::processRecord() to handle all other record types. This function returns BoolTrue if the record was processed, and BoolFalse on an error or abort request.
Semantics:
Check the first record tag for FEP_EVENT_REC_3x3. If it is not this type, call PmEvent::processRecord() to attempt to handle the record. If the record type matches, declare Pixel3x3 instance, and pass it expInfo, and a pointer to the record to Pixel3x3::attachData(). expInfo supplies the new event with the configured split threshold levels and exposure overclock levels, and converts the event's pixel position to absolute CCD coordinates. Then call PmEvent::filterEvent(). If filterEvent() accepts the event, call sendEvent() to pack it into the data buffer.
Concurrency:
Guarded

37.23.4 sendEvent()

Protected member of:
PmTeFaintBias3x3
Return Class:
Boolean

Arguments:

Pixel3x3& event
Documentation:
This function processes an accepted event, indicated by event, produced by the FEP, storing the event into dataForm's telemetry buffer, and posting dataForm's buffer when and if it becomes full. This function returns BoolTrue if the event was processed, and BoolFalse on an error or abort request.
Semantics:
If dataForm does not already have a packet buffer, call waitForPkt() to obtain a telemetry packet, and set the header information in the packet. If the run is aborted while waiting for a packet, return BoolFalse. Use the passed event to get the CCD position of the event, and the event's raw pulse height values, and bias values and append them to the current telemetry packet. Increment the mode's event counter using PixelEvent::incEventCnt(). If the telemetry buffer is full, post it to telemetry.
Concurrency:
Guarded

37.24 Class PmTeGraded

Documentation:
This class is responsible for processing 3x3 Timed Exposure Events, and producing Graded Mode telemetry data. This class provides functions to Front End Processor event data records, to pack and post to telemetry Graded Mode events, and to produce Faint Mode exposure records (Graded Mode uses the same exposure records as Faint Mode).
Export Control:
Public
Cardinality:
6

Hierarchy:

Superclasses:

PmEvent

Implementation Uses:

Tf_Record_Te_Faint
FEPeventRec3x3
Pixel3x3

Public Interface:

Operations:

PmTeGraded()
processRecord()

Protected Interface:

Operations:

finishExposure()
sendEvent()

Private Interface:

Has-A Relationships:


Tf_Data_Te_Graded dataForm: This is the telemetry builder used by the mode to accumulate and format graded event pixel data.

unsigned packetNum: This is the data packet number for the current exposure.
Concurrency:
Guarded
Persistence:
Persistent

37.24.1 PmTeGraded()

Public member of:
PmTeGraded
Documentation:
This is the constructor for the PmTeGraded class. This function sets the instance variables of the class to default values.
Concurrency:
Guarded

37.24.2 finishExposure()

Protected member of:
PmTeGraded
Return Class:
Boolean
Documentation:
This function completes the current exposure, forming and sending an exposure record. It returns BoolTrue on success, and BoolFalse on error or abort request.
Semantics:
Check dataForm.hasBuffer() and if the packet buffer has data, post it. Declare an exposure record form and call PmEvent::setupExposureRecord() to obtain its telemetry buffer and store common exposure record information into the buffer. Then call form.post() to queue the packet buffer to telemetry.
Concurrency:
Guarded

37.24.3 processRecord()

Public member of:
PmTeGraded
Return Class:
Boolean

Arguments:

const RINGREC& record
Documentation:
This function processes a record produced by the FEP, contained within record. This function explicitly handles the following record tag types:
FEP_EVENT_REC_3x3 (FEPeventRec3x3)
It uses its parent's member function, PmEvent::processRecord() to handle all other record types. This function returns BoolTrue if the record was processed, and BoolFalse on an error or abort request.
Semantics:
Check the first record tag for FEP_EVENT_REC_3x3. If it is not this type, call PmEvent::processRecord() to attempt to handle the record. If the record type matches, declare Pixel3x3 instance, and pass it expInfo, and a pointer to the record to Pixel3x3::attachData(). expInfo supplies the new event with the configured split threshold levels and exposure overclock levels, and coverts the event's pixel position to absolute CCD coordinates. Then call PmEvent::filterEvent(). If filterEvent() accepts the event, call sendEvent() to pack it into the data buffer.
Concurrency:
Guarded

37.24.4 sendEvent()

Protected member of:
PmTeGraded
Return Class:
Boolean

Arguments:

Pixel3x3& event
Documentation:
This function processes an accepted event, indicated by event, produced by the FEP, storing the event into dataForm's telemetry buffer, and posting dataForm's buffer when and if it becomes full. This function returns BoolTrue if the event was processed, and BoolFalse on an error or abort request.
Semantics:
If dataForm does not already have a packet buffer, call waitForPkt() to obtain a telemetry packet, and set the header information in the packet. If the run is aborted while waiting for a packet, return BoolFalse. Use the passed event to get the CCD position of the event, the events amplitude and grade code, and to sum the corner pixel pulse heights. Append the acquired information to the current telemetry packet. Increment the mode's event counter using PixelEvent::incEventCnt(). If the telemetry buffer is full, post it to telemetry.
Concurrency:
Guarded

37.25 Class PmCcRaw

Documentation:
This class processes raw Continuous Clocking Mode data.
Export Control:
Public
Cardinality:
6

Hierarchy:

Superclasses:

PmRaw

Implementation Uses:

FEPeventRecRaw
Tf_Record_Cc_Raw

Public Interface:

Operations:

PmCcRaw()
processRecord()

Protected Interface:

Operations:

finishExposure()
digestRawRecord()
setupDataPkt()

Private Interface:

Has-A Relationships:


Tf_Data_Cc_Raw rawForm: This is the Continuous Clocking Raw Mode data packet.

unsigned rowsPacked: This indicates the number of raw rows packed into the data packet.

Boolean accumulating: This indicates whether or not the mode is accumulating FEP to BEP records into a single record. BoolFalse indicates that a raw data record is not being accumulated. BoolTrue indicates that the data record is being accumulated.

unsigned* packPtr: This is the current position in the data packet where the next row is to be packed.

unsigned packLen: This is the space remaining in the telemetry packet buffer.

unsigned packWritten: This is the total number of words currently written into the telemetry packet buffer.

Boolean packPartial: This indicates that the last write to the telemetry packet buffer left a partially written word at the end of the packet. If this is BoolTrue at the point at which the buffer is to be sent, packWritten should be advanced by 1 to include the last word in the buffer.

unsigned packPixels: This is the total number of pixels packed into telemetry for the current exposure.

unsigned packetNum: This is the current number of data packets sent so far in the exposure.
Concurrency:
Guarded
Persistence:
Transient

37.25.1 PmCcRaw()

Public member of:
PmCcRaw
Documentation:
This is the constructor for the PmCcRaw class. This function sets the instance variables of the class to default values.
Concurrency:
Guarded

37.25.2 digestRawRecord()

Protected member of:
PmCcRaw
Return Class:
Boolean

Arguments:

FEPeventRecRaw* record
Documentation:
This function processes the raw mode record, record. If successful, the function returns BoolTrue. If the run is aborted, it returns BoolFalse.
Semantics:
Declare a PixelRow instance, row, invoke setup() and attachData() to associate the row instance with the passed record. Call PmRaw::filterRow() to apply the clipping windows. Then use setupDataPkt() to ensure that rawForm has a telemetry packet buffer. Call PmRaw::packRow() to pack the row into the telemetry packet. If the row doesn't fit into the buffer, post the current buffer to telemetry. Then call setupDataPkt() to assign a new telemetry packet buffer, and call packRow() again to load the row into the new buffer. Once the row has been packed, advance packPixels and packWritten by the number of pixels copied and the number of words written into the buffer, respectively.
Concurrency:
Guarded

37.25.3 finishExposure()

Protected member of:
PmCcRaw
Return Class:
Boolean
Documentation:
This function ends the current exposure for Continuous Clocking Raw mode. If successful, this function returns BoolTrue. If the run is aborted, it returns BoolFalse.
Semantics:
If rawForm has an un-sent data buffer, post the remaining data packet using rawForm.post(). Declare a raw mode record and obtain a telemetry packet buffer using waitForPkt(). Set the various fields in the packet buffer, and post it to telemetry. If the run is aborted while waiting for a packet buffer, return BoolFalse. If not, return BoolTrue.
Concurrency:
Guarded

37.25.4 processRecord()

Public member of:
PmCcRaw
Return Class:
Boolean

Arguments:

const RINGREC& record
Documentation:
This function processes the FEP to BEP record contained in record. If successful, the function returns BoolTrue. If the run is aborted, it returns BoolFalse.
Semantics:
If in the process of accumulating a raw mode record from the FEP (accumulating == BoolTrue), call accumulateRawRecord(). If the record completes, set accumulating to BoolFalse and call digestRawRecord() to process the completed row. If not in the process of accumulating a record, and the record type indicates the start of a row record, call accumulateRawRecord() to start the accumulation. If not processing a raw mode record, let the parent handle the record using PmRaw::processRecord().
Concurrency:
Guarded

37.25.5 setupDataPkt()

Protected member of:
PmCcRaw
Return Class:
Boolean

Arguments:

PixelRow& row
Documentation:
This function acquires a telemetry packet buffer for the data packet, rawForm, and initializes the header fields in the data packet. row is the first row to attempt to be packed into the telemetry packet buffer.
Semantics:
If rawForm does not have a buffer, use waitForPkt() to obtain a buffer for the form. If the run is aborted while waiting, return BoolFalse. Once a buffer is obtained set the fields in the packet header, using row.getRange() to get the row number. Set packPtr to the data area of the packet buffer and packLen to the number of data words available. Zero packWritten.
Concurrency:
Guarded

37.26 Class PmCcFaint1x3

Documentation:
This class is responsible for processing 1x3 Continuous Clocking Events, and producing Faint Mode telemetry data. This class provides functions to Front End Processor event data records, to pack and post to telemetry Faint Mode 1x3 events, and to produce Faint Mode exposure records.
Export Control:
Public
Cardinality:
6

Hierarchy:

Superclasses:

PmEvent

Implementation Uses:

Tf_Record_Cc_Faint
FEPeventRec1x3
Pixel1x3

Public Interface:

Operations:

PmCcFaint1x3()
processRecord()

Protected Interface:

Operations:

finishExposure()
sendEvent()

Private Interface:

Has-A Relationships:


Tf_Data_Cc_Faint dataForm: This is the telemetry builder used by the mode to accumulate and format 1x3 event pixel data.

unsigned packetNum: This is the data packet number for the current exposure.
Concurrency:
Guarded
Persistence:
Persistent

37.26.1 PmCcFaint1x3()

Public member of:
PmCcFaint1x3
Documentation:
This is the constructor for the PmCcFaint1x3 class. This function sets the instance variables of the class to default values.
Concurrency:
Guarded

37.26.2 finishExposure()

Protected member of:
PmCcFaint1x3
Return Class:
Boolean
Documentation:
This function completes the current exposure, forming and sending an exposure record. It returns BoolTrue on success, and BoolFalse on error or abort request.
Semantics:
Check dataForm.hasBuffer() and if the packet buffer has data, post it. Declare an exposure record form and call PmEvent::setupExposureRecord() to obtain its telemetry buffer and store common exposure record information into the buffer. Then call form.post() to queue the packet buffer to telemetry.
Concurrency:
Guarded

37.26.3 processRecord()

Public member of:
PmCcFaint1x3
Return Class:
Boolean

Arguments:

const RINGREC& record
Documentation:
This function processes a record produced by the FEP, contained within record. This function explicitly handles the following record tag types:
FEP_EVENT_REC_1x3 (FEPeventRec1x3)
It uses its parent's member function, PmEvent::processRecord() to handle all other record types. This function returns BoolTrue if the record was processed, and BoolFalse on an error or abort request.
Semantics:
Check the first record tag for FEP_EVENT_REC_1x3. If it is not this type, call PmEvent::processRecord() to attempt to handle the record. If the record type matches, declare Pixel1x3 instance, and pass it expInfo, and a pointer to the record to Pixel1x3::attachData(). expInfo supplies the new event with the configured split threshold levels and exposure overclock levels, and converts the event's pixel position to absolute CCD coordinates. Then call PmEvent::filterEvent(). If filterEvent() accepts the event, call sendEvent() to pack it into the data buffer.
Concurrency:
Guarded

37.26.4 sendEvent()

Protected member of:
PmCcFaint1x3
Return Class:
Boolean

Arguments:

Pixel1x3& event
Documentation:
This function processes an accepted event, indicated by event, produced by the FEP, storing the event into dataForm's telemetry buffer, and posting dataForm's buffer when and if it becomes full. This function returns BoolTrue if the event was processed, and BoolFalse on an error or abort request.
Semantics:
If dataForm does not already have a packet buffer, call waitForPkt() to obtain a telemetry packet, and set the header information in the packet. If the run is aborted while waiting for a packet, return BoolFalse. Use the passed event to get the CCD position of the event, and the event's raw pulse height values and append them to the current telemetry packet. Increment the mode's event counter using PixelEvent::incEventCnt(). If the telemetry buffer is full, post it to telemetry.
Concurrency:
Guarded

37.27 Class PmCcGraded

Documentation:
This class is responsible for processing 1x3 Continuous Clocking Events, and producing Graded Mode telemetry data. This class provides functions to Front End Processor event data records, to pack and post to telemetry Graded Mode events, and to produce Faint Mode exposure records (Graded mode and Faint mode use the same exposure record type).
Export Control:
Public
Cardinality:
6

Hierarchy:

Superclasses:

PmEvent

Implementation Uses:

Tf_Record_Cc_Faint
FEPeventRec1x3
Pixel1x3

Public Interface:

Operations:

PmCcGraded()
processRecord()

Protected Interface:

Operations:

finishExposure()
sendEvent()

Private Interface:

Has-A Relationships:


Tf_Data_Cc_Graded dataForm: This is the telemetry builder used by the mode to accumulate and format 1x3 event pixel data.

unsigned packetNum: This is the data packet number for the current exposure.
Concurrency:
Guarded
Persistence:
Persistent

37.27.1 PmCcGraded()

Public member of:
PmCcGraded
Documentation:
This is the constructor for the PmCcGraded class. This function sets the instance variables of the class to default values.
Concurrency:
Guarded

37.27.2 finishExposure()

Protected member of:
PmCcGraded
Return Class:
Boolean
Documentation:
This function completes the current exposure, forming and sending an exposure record. It returns BoolTrue on success, and BoolFalse on error or abort request.
Semantics:
Check dataForm.hasBuffer() and if the packet buffer has data, post it. Declare an exposure record form and call PmEvent::setupExposureRecord() to obtain its telemetry buffer and store common exposure record information into the buffer. Then call form.post() to queue the packet buffer to telemetry.
Concurrency:
Guarded

37.27.3 processRecord()

Public member of:
PmCcGraded
Return Class:
Boolean

Arguments:

const RINGREC& record
Documentation:
This function processes a record produced by the FEP, contained within record. This function explicitly handles the following record tag types:
FEP_EVENT_REC_1x3 (FEPeventRec1x3)
It uses its parent's member function, PmEvent::processRecord() to handle all other record types. This function returns BoolTrue if the record was processed, and BoolFalse on an error or abort request.
Semantics:
Check the first record tag for FEP_EVENT_REC_1x3. If it is not this type, call PmEvent::processRecord() to attempt to handle the record. If the record type matches, declare Pixel1x3 instance, and pass it expInfo, and a pointer to the record to Pixel1x3::attachData(). expInfo supplies the new event with the configured split threshold levels and exposure overclock levels, and converts the event's pixel position to absolute CCD coordinates. Then call PmEvent::filterEvent(). If filterEvent() accepts the event, call sendEvent() to pack it into the data buffer.
Concurrency:
Guarded

37.27.4 sendEvent()

Protected member of:
PmCcGraded
Return Class:
Boolean

Arguments:

Pixel1x3& event
Documentation:
This function processes an accepted event, indicated by event, produced by the FEP, storing the event into dataForm's telemetry buffer, and posting dataForm's buffer when and if it becomes full. This function returns BoolTrue if the event was processed, and BoolFalse on an error or abort request.
Semantics:
If dataForm does not already have a packet buffer, call waitForPkt() to obtain a telemetry packet, and set the header information in the packet. If the run is aborted while waiting for a packet, return BoolFalse. Use the passed event to get the CCD position of the event, and the event's amplitude and grade and append them to the current telemetry packet. Increment the mode's event counter using PixelEvent::incEventCnt(). If the telemetry buffer is full, post it to telemetry.
Concurrency:
Guarded
 

Table of Contents Next Chapter