| ⇤ ← Revision 1 as of 2019-08-06 16:52:44   Size: 595 Comment:  | Size: 2742 Comment:  | 
| Deletions are marked like this. | Additions are marked like this. | 
| Line 3: | Line 3: | 
| * NOTE: We generate the emission data first since this shell script first initializes the LROC NAC EDR, which will be used by incidence and I/F.  The shell script here generates phoE.IMG. [[attachment:ISISe.sh]] * Generating the IMG takes awhile, so we have a wrapper to run all the images at once. NOTE: This wrapper requires directory setup. Each image has its own folder; the folder name is the last 5 digits of the NAC, plus the L or R for left/right. The wrapper should be placed in the directory containing all the image folders. [[attachment:wrapperISISe.sh]] | * NOTE: We generate the emission data first since this shell script first initializes the LROC NAC EDR, which will be used by incidence and I/F.  The shell script here generates phoE.IMG. {{{ # 4 Aug 2017 - Eric E. Palmer # Script to do many of the steps required for building a photometric cube # Requires a lot of directory setup. # Calibrated images in working/NEW_IMAGES # EDR images in img-<last4)[LR] # Modified by JRW Oct 6 2017 # Modified by JRW Aug 28 2018 # Modified by JRW Nov 19 2018 to include last five digits. # Usage # gen.sh <calibratedIMG> <last5[LR]> file=$1 out=$2 if [ '$file' == '' ] then echo "Usage $0 <calibratedIMG> <last5L>" fi if [ '$out' == '' ] then echo "Usage $0 <calibratedIMG> <last5L>" fi echo "File: $file" echo "Outfile: $out" if [ 'two' == 'two' ] then lronac2isis FROM=$file.IMG TO=$file.cub spiceinit FROM=$file.cub shape=ellipsoid caminfo FROM=$file.cub TO=info.txt # Generate emission data phocube FROM=$file.cub TO=phoE-$out.cub I=false PHASE=false LAT=false LON=false isis2pds FROM=phoE-$out.cub to=phoE-$out.img BITTYPE=u16bit STRETCH=linear MINPER=0 MAXPER=100 fi calFile=`echo $file | tr E C` echo "calFile: $calFile" # Create an image that is really the image's phase #ln -s ../working/NEW_IMAGES orig #../bin/mergePhase $calFile emiss.img #mv M*C.IMG orig # Get the directory ready for dumpMapLRO.f #ln -s ../working/MAPFILES . }}} * Generating the IMG takes awhile, so we have a wrapper to run all the images at once. NOTE: This wrapper requires directory setup. Each image has its own folder; the folder name is the last 5 digits of the NAC, plus the L or R for left/right. The wrapper should be placed in the directory containing all the image folders. {{{ # 5 Aug 2018 - John Weiric2 # Wrapper for ISISe.sh to run multiple files # Usage # sh wrapperISISe.sh <imageList> # Modified Nov 19 2018 to include last 5 digits. file=$1 list=`cat $file` for i in $list do # need to determine the last five characters since # that is how the directories are set up strLength=`echo $i | wc | cut -c23-24` if [ "$strLength" != "13" ] then if [ "$strLength" != "14" ] then echo "string length not supported" exit fi fi if [ "$strLength" == "13" ] then lastFive=`echo $i | cut -c6-11` echo $lastFive fi if [ "$strLength" == "14" ] then lastFive=`echo $i | cut -c7-12` echo $lastFive fi #exit # with last five character, can now get into folder cd img-$lastFive ../ISISe.sh $i $lastFive cd .. done }}} | 
ISIS to Emission
- NOTE: We generate the emission data first since this shell script first initializes the LROC NAC EDR, which will be used by incidence and I/F. The shell script here generates phoE.IMG.
# 4 Aug 2017 - Eric E. Palmer
# Script to do many of the steps required for building a photometric cube
# Requires a lot of directory setup.
#       Calibrated images in working/NEW_IMAGES
#  EDR images in img-<last4)[LR]
# Modified by JRW Oct 6 2017
# Modified by JRW Aug 28 2018
# Modified by JRW Nov 19 2018 to include last five digits.
# Usage
#                gen.sh <calibratedIMG> <last5[LR]>
file=$1
out=$2
if [ '$file' == '' ]
then
        echo "Usage $0 <calibratedIMG> <last5L>"
fi
if [ '$out' == '' ]
then
        echo "Usage $0 <calibratedIMG> <last5L>"
fi
echo "File: $file"
echo "Outfile: $out"
if [ 'two' == 'two' ]
then
        lronac2isis FROM=$file.IMG TO=$file.cub
        spiceinit FROM=$file.cub shape=ellipsoid
        caminfo FROM=$file.cub TO=info.txt
        # Generate emission data
        phocube FROM=$file.cub TO=phoE-$out.cub I=false PHASE=false LAT=false LON=false
        isis2pds FROM=phoE-$out.cub to=phoE-$out.img BITTYPE=u16bit STRETCH=linear MINPER=0 MAXPER=100
fi
calFile=`echo $file | tr E C`
echo "calFile: $calFile"
# Create an image that is really the image's phase
#ln -s ../working/NEW_IMAGES orig
#../bin/mergePhase $calFile emiss.img
#mv M*C.IMG orig
# Get the directory ready for dumpMapLRO.f
#ln -s ../working/MAPFILES .- Generating the IMG takes awhile, so we have a wrapper to run all the images at once. NOTE: This wrapper requires directory setup. Each image has its own folder; the folder name is the last 5 digits of the NAC, plus the L or R for left/right. The wrapper should be placed in the directory containing all the image folders.
# 5 Aug 2018 - John Weiric2
# Wrapper for ISISe.sh to run multiple files
# Usage
#       sh wrapperISISe.sh <imageList>
# Modified Nov 19 2018 to include last 5 digits.
file=$1
list=`cat $file`
for i in $list
do
# need to determine the last five characters since
# that is how the directories are set up
  strLength=`echo $i | wc | cut -c23-24`
  if [ "$strLength" != "13" ]
  then
    if [ "$strLength" != "14" ]
    then
      echo "string length not supported"
      exit
    fi
  fi
  if [ "$strLength" == "13" ]
  then
    lastFive=`echo $i | cut -c6-11`
    echo $lastFive
  fi
  if [ "$strLength" == "14" ]
  then
    lastFive=`echo $i | cut -c7-12`
    echo $lastFive
  fi
#exit
# with last five character, can now get into folder
  cd img-$lastFive
  ../ISISe.sh $i $lastFive
  cd ..
done






