## page was renamed from Block 2 - Ingest V0
= Block 2 - Ingest V2 =

== Description ==

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

Basic steps
 * Copy FITS images
 * Make a list of images
 * Updated kernels
 * Run [[process_fits]]
 * Run [[make_sumfiles]]





== Procedure ==
=== 1. Create the following file ===
{{{
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
}}}



=== 2. Running PROCESS_FITS to populate IMAGEFILES, PICTLIST.TXT, and make_sumfiles.in ===
{{{
# Create a symbolic link to the location of the images -- this is a single line
ln -s  <Full pathname to directory containing images> images

# Build the list of images to process
ls images/ > imgList

# Run the script
sh lsupport/processScript.sh imgList | tee output.txt

# Store the results
mkdir ../log/step1-1
mv output.txt imgList ../log/step1-1
rm images                # get rid of the symbolic link
}}}
=== 3. Create the SUMFILES and NOMINALS ===
{{{
# Run the command with option 0
echo 0 | /usr/local/bin/make_sumfiles | tee output.txt


# Store the results
mkdir ../log/step1-2
mv output.txt ../log/step1-2
}}}
----------

''(Compiled by JRW)''

CategoryHowTos