Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Panel

There are several getters for various image data:

  • getFrameValue Gives you the width and height (in pixels) of the image, and a pointer to the start of the pixel array of a Pds::Camera::FrameV1 object.
  • getOpal1kValue an alias for getFrameValue
  • getTm6740Value an alias for getFrameValue
  • getCspadQuad Gives you a pointer to the first position in the array of pixel data from the XPP CsPad detector .(or alternatively you can get a pointer to the Pds::CsPad::ElementV1 object itself).
Code Block

int getFrameConfig   (FrameDetector det);
Code Block

 ------------------------------------------------------------------------------------------------------
 To get an image Frame
 ------------------------------------------------------------------------------------------------------

 int getFrameConfig   (FrameDetector det);

 -->  Checks that the xtc file has got data from this device.

 int getFrameValue(FrameDetector det, int& frameWidth, int& frameHeight, unsigned short*& image );

 --> fetches an image from the FrameDetector of your choice.
     Note that 
     Specify the detector (using an appropriate enum), give pointers to
                  int frame width, frame height and short imgage of the Camera::FrameV1.

  

fetches an image from the FrameDetector of your choice.
Specify the detector (using an appropriate enum), and getFrameValue will direct your pointers to the width and height of the image as well as the start of the pixel array.

Code Block

Other frame detectors:
  AMO:
      AmoVmi
      AmoBps1
      AmoBps2
  SXR:
      SxrBeamlineOpal1
      SxrBeamlineOpal2
      SxrEndstationOpal1
      SxrEndstationOpal2
      SxrFccd
   XPP:
      XppSb1PimCvd
      XppMonPimCvd
      XppSb3PimCvd
      XppSb4PimCvd


For an example of how to draw the image as a 2D root histogram, see the myana_cspad.cc example.

Code Block
 ------------------------------------------------------------------------------------------------------
 Princeton camera
 ------------------------------------------------------------------------------------------------------

 int getPrincetonConfig(Pds::DetInfo::Detector det, int iDevId,
                        int& width, int& height, int& orgX, int& orgY, int& binX, int&binY);
 -->

 int getPrincetonValue(Pds::DetInfo::Detector det, int iDevId, unsigned short *& image);
 -->

 int getPrincetonTemperature(Pds::DetInfo::Detector det, int iDevId, float& temperature);

 ------------------------------------------------------------------------------------------------------
 Ipimb detector (Intensity Position, Intensity Monitor Board)
 ------------------------------------------------------------------------------------------------------
 int getIpimbConfig(Pds::DetInfo::Detector det, int iDevId);
 -->

 int getIpimbVolts(Pds::DetInfo::Detector det, int iDevId,
                   float &channel0, float &channel1, float &channel2, float &channel3);
 -->


 ------------------------------------------------------------------------------------------------------
 Encoder detector
 ------------------------------------------------------------------------------------------------------

  int getEncoderConfig   (Pds::DetInfo::Detector det, int iDevId);
  -->

  int getEncoderCount(Pds::DetInfo::Detector det, int iDevId, unsigned int& encoderCount);
  -->

------------------------------------------------------------------------------------------------------
 FCCD (Fast CCD)
 ------------------------------------------------------------------------------------------------------
 int getFccdConfig(FrameDetector det, uint16_t& outputMode, bool& ccdEnable, bool& focusMode, uint32_t& exposureTime,
                  float& dacVoltage1, float& dacVoltage2, float& dacVoltage3, float& dacVoltage4,
                  float& dacVoltage5, float& dacVoltage6, float& dacVoltage7, float& dacVoltage8,
                  float& dacVoltage9, float& dacVoltage10, float& dacVoltage11, float& dacVoltage12,
                  float& dacVoltage13, float& dacVoltage14, float& dacVoltage15, float& dacVoltage16,
                  float& dacVoltage17,
                  uint16_t& waveform0, uint16_t& waveform1, uint16_t& waveform2, uint16_t& waveform3,
                  uint16_t& waveform4, uint16_t& waveform5, uint16_t& waveform6, uint16_t& waveform7,
                  uint16_t& waveform8, uint16_t& waveform9, uint16_t& waveform10, uint16_t& waveform11,
                  uint16_t& waveform12, uint16_t& waveform13, uint16_t& waveform14);
 --> Configures the information from the Fast CCD. Fills arguments with values depending on
     how the image/waveform data were taken.

 ------------------------------------------------------------------------------------------------------
 DiodeFex
 ------------------------------------------------------------------------------------------------------
 int getDiodeFexConfig (Pds::DetInfo::Detector det, int iDevId, float* base, float* scale);
 -->
 int getDiodeFexValue (Pds::DetInfo::Detector det, int iDevId, float& value);
 -->

 ------------------------------------------------------------------------------------------------------
 Imp detector Fex (feature extraction)
 ------------------------------------------------------------------------------------------------------
 int getIpmFexConfig   (Pds::DetInfo::Detector det, int iDevId,
                       float* base0, float* scale0,
                       float* base1, float* scale1,
                       float* base2, float* scale2,
                       float* base3, float* scale3,
                       float& xscale, float& yscale);
 int getIpmFexValue   (Pds::DetInfo::Detector det, int iDevId,
                      float* channels, float& sum, float& xpos, float& ypos);

 ------------------------------------------------------------------------------------------------------
 CsPad detector
 ------------------------------------------------------------------------------------------------------
 namespace Pds { namespace CsPad { class ConfigV1; }}
 int getCspadConfig (Pds::DetInfo::Detector det, unsigned& quadMask, unsigned& asicMask);
 int getCspadConfig (Pds::DetInfo::Detector det, Pds::CsPad::ConfigV1& cfg);

 namespace Pds { namespace CsPad { class ElementV1; }}
 int getCspadQuad  (Pds::DetInfo::Detector det, unsigned quad, const uint16_t*& pixels);
 int getCspadQuad  (Pds::DetInfo::Detector det, unsigned quad, const Pds::CsPad::ElementV1*& data);

------------------------------------------------------------------------------------------------------
 Other functions that do not require (or have) configuration
 ------------------------------------------------------------------------------------------------------


 int getFeeGasDet  (double* shotEnergy);
 --> Gives you the shot energy to the array shotEnergy[4]. This information is obtained from
     the Front End Enclosure Gas Detector.



 int getEBeam(double& charge, double& energy, double& posx, double& posy,
              double& angx, double& angy);
 int getEBeam(double& charge, double& energy, double& posx, double& posy,
              double& angx, double& angy, double& pkcurr);
  --> Gives electron beam values for each of these doubles. The measured charge of the beam (in nC),
      the measured energy of the beam (in MeV), the 2D position of the beam (in mm) away from the origin
      (nominal beam position), and 2D angular position (in mrad) off the assumed direction. and the
      pkcurr = current? in (Amps)



 int getPhaseCavity(double& fitTime1, double& fitTime2, double& charge1,  double& charge2);
 --> Gives you the phase cavity fit time (low and high?) and charges (before and after?).


 int getPnCcdValue (int deviceId, unsigned char*& image, int& width, int& height );
 --> The PnCCD camera (used by CAMP) has 4 links, each link provides a 512 x 512 x 16 bit image.
     This function combines the four images to a single 1024 x 1024 x 16 bit image.


 int getEvrDataNumber();

 int getEvrData    ( int id, unsigned int& eventCode, unsigned int& fiducial, unsigned int& timeStamp );
     - eventCode tells you something about the beam quality of this event. Usually the event code is  140,
       meaning electrons were produced upstream (beam was on). It does not tell you about the photon status.
       Other codes:

     - fiducial
     - timestamp


 ------------------------------------------------------------------------------------------------------
 EPICS
 ------------------------------------------------------------------------------------------------------

 Get integers, floats, strings from any EPICS channel (PV = process variable)
 int getPvInt      (const char* pvName, int& value);
 int getPvFloat    (const char* pvName, float& value);
 int getPvString   (const char* pvName, char*& value);