Differences between revisions 4 and 9 (spanning 5 versions)
Revision 4 as of 2018-01-12 17:29:16
Size: 1416
Editor: JohnWeirich
Comment:
Revision 9 as of 2018-03-23 11:47:22
Size: 2470
Editor: EricPalmer
Comment:
Deletions are marked like this. Additions are marked like this.
Line 6: Line 6:
This block additionally ingests images from FITS files into the SPC world. This block additionally ingests images from FITS files into the SPC world.    Basic steps
 1. Copy FITS images
 * Make a list of images
 * Updated kernels
 * Run [[process_fits]]
 * Run [[make_sumfiles]]
Line 9: Line 16:
== Assumptions ==
 * You have invoked a Bourne-Again Shell (bash)
 * You are a member of the group OREX\spc
 * You have set up a skeleton directory in the following format:
{{{
Line 15: Line 17:
Bennu/
     DATA/
     IMAGEFILES/
     NOMINALS/
     SUMFILES/
     SHAPEFILES/
     lsupport/
}}}
Line 25: Line 20:
=== 1. Create the following file === === Copy FITS images ===
Install a copy of the FITS images for each day into the NEW_IMAGES_YYYY_DDD location.
Line 27: Line 23:
vi lsupport/processScript.sh

    # Takes a list of image names and runs process_fits on them
    # Eric E. Palmer, 9 June 2015
    file=$1
    prefix="images" # symbolic link to source images
    list=`cat $file`
    for item in $list
    do
       echo "$prefix/$item" | process_fits
    done
/path/ops/OSIRIS_REx/NEW_IMAGES_YYYY_DDD
Line 42: Line 28:
=== 2. Running PROCESS_FITS to populate IMAGEFILES, PICTLIST.TXT, and make_sumfiles.in ===

=== Make a list of images ===
SPC can ingest images one at a time via [[process_fits]], but we prefer to run it in batch. If [[newpix.txt]] exists, then [[process_fits]] will use that as input. It will search through all directories in the form of ../OSIRIS_REx/NEW_IMAGES_YYY_DDD .

For tracking purposes, we will name the list of images via data shortcut name and put it into lsupport. The shortcut name is the short hand for mission name (Ap, PS, OA, DS, OB, Re) and the sequence number of the images set, i.e. the first delivery is 1, the next is 2, etc.
Line 44: Line 35:
# Create a symbolic link to the location of the images -- this is a single line
ln -s <Full pathname to directory containing images> images
cd /path/ops/OSIRIS_REx/NEW_IMAGES_YYYY_DD D
ls > ../newpix.Ap4
cd ../Approch150B.v1
mv ../newpix.Ap4 lsupport/
relink lsupport/newpix.Ap4 newpix.txt
ls -l newpix.txt
}}}
Line 47: Line 43:
# Build the list of images to process
ls images/ > imgList
Line 50: Line 44:
# Run the script
sh lsupport/processScript.sh imgList | tee output.txt
Line 53: Line 45:
# Store the results
mkdir step1-1
mv output.txt imgList step1-1
rm images # get rid of the symbolic link
=== Updated kernels ===
Typically, you will need to update the spacecraft (SPK or file extension bsp) and pointing (CK or file extension bc). It may be necessary to update the spacecraft leap second clock also (lsp). Finally, if you get a new POLE, the planetary constants kernel for Bennu needs to be updated (PCK or file extension tpc).

 * Remember that many spacecraft kernels have both a reconstructed past history and a future predicted plan. As such, if you forget to update the SPKs, you could have images that are ingested using the predicted part of an outdated kernel, which won't throw an error.

 * Remember that SPICE will load kernels in order and use the last loaded kernel for a given time, so the newest kernels should always be at the end of a list.

 1. Edit [[make_sumfiles.txt]]. We want to use chmod to avoid mistakenly over writing such an important file.
{{{
   chmod u+w make_sumfiles.txt
   vi make_sumfiles.txt # add the new kernels
   chmod a-w make_sumfiles.txt
Line 58: Line 58:


 1. If the PCK has changed, update [[INIT_LITHOS.TXT]] also.


=== Run [[process_fits]] ===
=== Run [[make_sumfiles]] ===


Line 61: Line 71:
''(Compiled by JRW)''

CategoryHowTos
''(Compiled by EEP)''

Block 2 - Ingest V2

Description

This block additionally ingests images from FITS files into the SPC world.

Basic steps

  1. Copy FITS images
  2. Make a list of images
  3. Updated kernels
  4. Run process_fits

  5. Run make_sumfiles

Procedure

Copy FITS images

Install a copy of the FITS images for each day into the NEW_IMAGES_YYYY_DDD location.

/path/ops/OSIRIS_REx/NEW_IMAGES_YYYY_DDD

Make a list of images

SPC can ingest images one at a time via process_fits, but we prefer to run it in batch. If newpix.txt exists, then process_fits will use that as input. It will search through all directories in the form of ../OSIRIS_REx/NEW_IMAGES_YYY_DDD .

For tracking purposes, we will name the list of images via data shortcut name and put it into lsupport. The shortcut name is the short hand for mission name (Ap, PS, OA, DS, OB, Re) and the sequence number of the images set, i.e. the first delivery is 1, the next is 2, etc.

cd /path/ops/OSIRIS_REx/NEW_IMAGES_YYYY_DD D 
ls > ../newpix.Ap4
cd ../Approch150B.v1
mv ../newpix.Ap4 lsupport/
relink lsupport/newpix.Ap4 newpix.txt
ls -l newpix.txt

Updated kernels

Typically, you will need to update the spacecraft (SPK or file extension bsp) and pointing (CK or file extension bc). It may be necessary to update the spacecraft leap second clock also (lsp). Finally, if you get a new POLE, the planetary constants kernel for Bennu needs to be updated (PCK or file extension tpc).

  • Remember that many spacecraft kernels have both a reconstructed past history and a future predicted plan. As such, if you forget to update the SPKs, you could have images that are ingested using the predicted part of an outdated kernel, which won't throw an error.
  • Remember that SPICE will load kernels in order and use the last loaded kernel for a given time, so the newest kernels should always be at the end of a list.
  • Edit make_sumfiles.txt. We want to use chmod to avoid mistakenly over writing such an important file.

   chmod u+w make_sumfiles.txt
   vi make_sumfiles.txt               # add the new kernels
   chmod a-w make_sumfiles.txt
  1. If the PCK has changed, update INIT_LITHOS.TXT also.

Run [[process_fits]]

Run [[make_sumfiles]]


(Compiled by EEP)

Block 2 - Ingest v2 (last edited 2018-12-19 16:12:14 by EricPalmer)