FLATFILES.TXT

Category B

Version 3.0.1

Description

This input file is a list of files that SPC will use to apply a flat field to the images. FLATFILES.TXT is used by process_fits. (See that entry for more information.)

  • Column 1 - Camera
  • Column 2 - Filter
  • Column 3 - "Filename" This is referenced from the working directory
  • /!\ If column 3 contains "NONE" (case matters), then SPC will skip looking for a flat file for that camera/filter.

Here is a sample FLATFILES.TXT file:

1  0 'NONE'
1  1 'NONE'
1  2 'NONE'
1  3 'NONE'
1  4 'NONE'
1  5 'NONE'
1  6 'NONE'
1  7 'DATA/MCAM_L_PAN_FlatFieldCorrection_20150120_V001.fits'
2  0 'NONE'
2  1 'NONE'
2  2 'NONE'
2  3 'NONE'
2  4 'NONE'
2  5 'NONE'
3  0 'DATA/PCAM_L_PAN_FlatFieldCorrection_20150318_V002.fits'
4  0 'DATA/new-navFlat.fits'
5  0 'DATA/new-navFlat.fits'
  • /!\ The flat file should be in FITS format with NAXIS1 and NAXIS2 defined. It is expected to be a signed float in MSB format.


CategoryThreeOhOne

make_sumfiles.in

Category B

Version 3.0.1

Description

This text file is a list of the image files needed by make_sumfiles to create SUMFILES and NOMINALS. It is created by process_fits an becomes an input for make_sumfiles.

make_sumfiles.in contains these 6 columns:

  • image name loaded into process_fits

  • spacecraft time of each image
  • camera number that took the image
  • spacecraft number for mission
  • bin
  • UTC time of each image

The vectors in the sumfiles and nominals are calculated directly from the kernels in make_sumfiles.txt by using the time for each image obtained from make_sumfiles.in.

The following sample make_sumfiles.in is from OSIRIS_REx.

  • /!\ This sample is in the format necessary for the OSIRIS-OREx mission. (!) Spacecraft time is needed to use CK kernels while epoch time is needed for spk kernels. Spacecraft, UTC, and epoch time can be transformed into one another pretty easily using spice, which SPC uses.

P596924821J3    3/0596924726.30615          3    1    1    -25.50       270     20181201T082552S75100Z_pol_L0_V002.fits
P601296494J3    1/0601296429.38732          3    1    1    -25.50       270     2019-01-20T22-47-05.541_PCAM_L0b_V004.fits
...

Column Definitions

PICNM

CLK

NC

NS

SCL

TC

NQ

FITSNM

SPC-OREx Naming

UTC or ET

Camera 1-5

Spacecraft Number

Binning (none)

Temperature in C

Filter/Focal

Source filename

Filter Number -- MapCam has filters based upon its position -- in degrees

Position

Filter Number

0

0

720

0

630

1

540

2

450

3

360

4

270

5

180

6

90

7

30

7

Filter Number --SamCam has filters based upon its position -- in degrees

Position

Filter Number

0

0

720

0

600

1

480

2

360

3

240

4

120

5

Focal Position -- PolyCam NQ=FLT

  • The motor position, 0 to 17,400

where:

d is the distance the camera is focused at in m

For practical reasons the infinity setting we use in the lab is actually
~4.3 km (PolyCam step 17,400) not actual infinity. At that setting we
measured the effective focal length 627.8mm. Based on the formula above
it means our CBE for finf is 628.9mm so until we get a better number from
post launch calibration images we should use

f(d) = 628.9 - 2684 * d ^ -0.9376


(Compiled by EP)

old - make_sumfiles.in-3.0A2


CategoryThreeOhOne

FITS Keywords

Category B

Version 3.0.1

Description

This list shows the keyword that process-fits reads, the SPC variable it sets and a description explaining the setting.

FITS Keyword

Levels

SPC Variable

Description

BITPIX

0/1

BITPIX

This sets the flag in SPC for how many bits to treat the data. Everything is eventually converted into unsigned integer. For ORex, the level 0 data is 16. The camera is a 14-bit imager, but the SPOC will pad the leading bits to 0 to make it a simple unsigned 16-bit integer. IF a LUT (look-up-table) is used, the SPOC will convert the 8-bit LUT into the standard 16-bit integers. For level 1, it is set to -32, which is 32-bit signed.

DATE_OBS

0/1

UTC0

The UTC time of the observation. This is converted within SPC via SPICE into ET, setting both ET0 and ET.

EXPTIME

0/1

EXP

The duration of the exposure. It is used to calculate the midpoint of the exposure. This is _ used for OREx.

SCLK_STR

0/1

CLK0 and CKLUSE

This is the spacecraft clock. If this value is set in the FITS headers, it is the primary time used to calculate the midpoint of the exposure.

NAXIS1

0/1

NPX

Number of pixels wide (the x value)

NAXIS2

0/1

NLN

Number of pixels tall (the y value)

CAMERAID

0/1

CAM

Which camera is being used. Values are 0-Map, 1-Sam, 2-Poly

MTR_POS

0/1

FLT

Defines the position of the PolyCam motor, which is used to calculate its focal position. For MapCam and SamCam, it provides the position of the filter wheel in degrees.

LUT

0

LUT

If LUT is defined, this tells what LUT was used on the spacecraft. No processing is done via SPC because the SPOC has already done it. This variable isn't used

MCFWHTMP

0/1

NTX (1,1)

MapCam temperature. The final algorithm has not been decided yet. However, the weighting of each temperature can be adjusted in the file DN2TEMP.TXT. This assumes a linear mixing of the four camera temperatures. Level 0 is in DN. Level 1 is in degrees C

MCFWMTMP

0/1

NTX (1,2)

see above

MCLENTMP

0/1

NTX (1,3)

see above

MCROETMP

0/1

NTX (1,4)

see above

SCFWHTMP

0/1

NTX (2,1)

SamCam temperature. The final algorithm has not been decided yet. However, the weighting of each temperature can be adjusted in the file DN2TEMP.TXT. This assumes a linear mixing of the four camera temperatures. Level 0 is in DN. Level 1 is in degrees C

SCFWMTMP

0/1

NTX (2,2)

see above

SCLENTMP

0/1

NTX (2,3)

see above

SCROETMP

0/1

NTX (2,4)

see above

PCFWHTMP

0/1

NTX (3,1)

PolyCam temperature. The final algorithm has not been decided yet. However, the weighting of each temperature can be adjusted in the file DN2TEMP.TXT. This assumes a linear mixing of the four camera temperatures. Level 0 is in DN. Level 1 is in degrees C

PCFWMTMP

0/1

NTX (3,2)

see above

PCLENTMP

0/1

NTX (3,3)

see above

PCROETMP

0/1

NTX (3,4)

see above

NCCHTEMP

0

NTX (4,0) and NTX (4,1)

NavCam temperature.

TCCHTEMP

0

NTX (5,0) and NTX (5,1)

TAGCam temperature

SC_QA

0/1

QT(0)

Quadterians. OREx will write the spacecraft pointing information, as of when the image was taken, into the FITS header. process_fits will output them in the file quaternions.txt in the format PICNM, QT(I), I=0,3

SC_QX

0/1

QT(1)

see above

SC_QY

0/1

QT(2)

see above

SC_QZ

0/1

QT(3)

see above

BZERO

0

DDN and SIGNED

FORTRAN reads all integers as signed. Because the data is unsigned, then the DN values less than zero are converted into high-bit values.

INSTRUME

0/1

INAME and NC

Level 0 has OCAMS, so NC is set via CAMERAID-1. This is the name of the instrument in human-readable form. It sets the variable NC as follows:

  • INSTRUME

    NC

    Comment

    MAP

    N/A Because INSTRUME will be OCAMS

    SAM

    N/A Because INSTRUME will be OCAMS

    POL

    N/A Because INSTRUME will be OCAMS

    NCM

    4

    NFT

    5

    OCAMS

    CAMERAID+1

  • /!\ The order of this is important because the camera number is the reference that SPC uses for camera ID within the configuration files make_sumfiles.txt, DN2TEMP, and FLATFIELD.TXT.


CategoryThreeOhOne

SPC-OREx Naming Convention

Category B

Version 3.0.1

Description

This provides more information about the naming conventions used in SPC-OREx.

  • INSTRUME keyword defines which camera system.
  • MTR_POS defines either filter position (MapCam, SamCam) or focal distance (PolyCam).

More detail about FITS Keywords

Level 0 Images

Character Position 1

1st character is based on Camera:

Character Positions 2-10

ET in seconds

Character Position 11

Always 'F'

Character Position 12

  • MapCam - based upon the filter wheel position (CAMERAID = 1)

    • Filt Pos

      char

      0

      0

      720

      0

      630

      1

      540

      2

      450

      3

      360

      4

      270

      5

      180

      6

      90

      7

      30

      7

  • SamCam - based upon the filter wheel position (CAMERAID = 2)

    • /!\ Filter position is defined with variable NQ and stored in make_sumfiles.in

      Filt Pos

      char

      0

      0

      720

      0

      600

      1

      480

      2

      360

      3

      240

      4

      120

      5

  • PolyCam - (CAMERAID = 3)

    • What it really is:
              Find the index (I) that is closest to motor position
              Then
                 K=93-I
      
              IF(K.LT.0) K=93-K
              I=K/10
      
             Position 11 => CHAR(65+I)   # 65 is an upper case 'A'
             Position 12 =>  K - 10*I     # (goes from 0 to 9)
    • /!\ J4 and up are "super focus" positions. A0 to J2 are nominal positions.

      Index

      Motor Pos

      11&12 Char

      1

      > 630

      J2

      ...

      93

      > 17190

      A0

      94

      > 17371

      J4

      ...

      116

      > 21510

      L6

      • Here is the source from PROCESS_FITS.f:
           IF(NC.EQ.3) THEN
              NQ=FLT
              K=0
              DO I=116,0,-1
                IF(NQ.LE.STEP(I+1)) K=93-I
              ENDDO
              IF(K.LT.0) K=93-K
              I=K/10
              K=K-10*I
              PICNM(11:11)=CHAR(65+I)
              FLT=K
            ENDIF
      ...
            WRITE(PICNM(12:12),FMT='(I1)') FLT
    • NavCam (CAMERAID = 4)

      • FLT = 0
    • NFTCam (CAMERAID =5)
      • FLT = 0

Level 1 Images

  • Everything is the same except for Character Position 11


CategoryThreeOhOne

TestPDFOutput (last edited 2018-05-20 19:15:25 by BMittan)