Commit 621310dd authored by Carl Schaffer's avatar Carl Schaffer
Browse files

adding split_ifu_function to UI

parent de93881b
...@@ -111,6 +111,7 @@ pro split_ifu,filebase ...@@ -111,6 +111,7 @@ pro split_ifu,filebase
; order fields and join with underscores ; order fields and join with underscores
fn_fields = ["gris-ifu",date_string,time_string,mode_string,run_string,map_string] fn_fields = ["gris-ifu",date_string,time_string,mode_string,run_string,map_string]
filename = strjoin(fn_fields,"_")+".fits" filename = strjoin(fn_fields,"_")+".fits"
sxaddpar,head_i,'FILENAME',filename, "Name of file"
; Ensure target folder is present ; Ensure target folder is present
; do this here to ensure it is only created as files are written ; do this here to ensure it is only created as files are written
...@@ -118,7 +119,7 @@ pro split_ifu,filebase ...@@ -118,7 +119,7 @@ pro split_ifu,filebase
if(cntdir eq 0) then spawn,'mkdir '+folder+'/level1_split' if(cntdir eq 0) then spawn,'mkdir '+folder+'/level1_split'
outdir=file_search(folder+'/level1_split',count=cntdir) outdir=file_search(folder+'/level1_split',count=cntdir)
outpath = outdir+'/'+filename outpath = outdir+'/'+filename
print,"Writing: "+outpath
; Add provenance information to header ; Add provenance information to header
sxaddpar,head_i,'HISTORY','split_ifu run on: '+string(systime(0)) sxaddpar,head_i,'HISTORY','split_ifu run on: '+string(systime(0))
......
...@@ -38,3 +38,11 @@ splitter () { ...@@ -38,3 +38,11 @@ splitter () {
} }
export IDL_STARTUP=$GRISREDDIR"/idl.pro" export IDL_STARTUP=$GRISREDDIR"/idl.pro"
split_ifu ()
{
for ifu_run in $(/bin/ls $1/level1/ |grep -o -E ".*[0-9]{2}[a-z]{3}[0-9]{2}\.[0-9]{3}"|sort -u);
do
echo "split_ifu, '$1/level1/$ifu_run'" | idl;
done
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment