
#!/bin/sh
if [ ! "$SAS_ODFDIR" ]; then
echo ""
echo "Please set the SAS_ODFDIR environment variable to point at the directory"
echo "containing the ODF files for this observation."
echo ""
exit 1
fi
# # [INFO] [2024-11-30T23:44:46] Module name: VerifyODF
# # [INFO] [2024-11-30T23:44:46] Instrument: all
# # [INFO] [2024-11-30T23:44:46] Stream no.: 0001
# # [INFO] [2024-11-30T23:44:46] Module version number: 1.18
# # [INFO] [2024-11-30T23:44:46] Version of odfingest used was 3.33.1
# # [INFO] [2024-11-30T23:44:46] Module name: MakeCIF
# # [INFO] [2024-11-30T23:44:46] Instrument: all
# # [INFO] [2024-11-30T23:44:46] Stream no.: 0001
# # [INFO] [2024-11-30T23:44:46] Module version number: 1.23
# # [INFO] [2024-11-30T23:44:46] Observation start defined as >2008-08-11T16:05:17.000<
# # [INFO] [2024-11-30T23:44:46] Processing date defined as >2024-12-01T00:44:46<
# [COMMAND] [2024-11-30T23:44:46]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:44:46]
export SAS_RAND_SEED=0551640301
# # [INFO] [2024-11-30T23:44:46] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0551640301
# [COMMAND] [2024-11-30T23:44:46]
cifbuild analysisdate=2024-12-01T00:44:46 calindexset=product/P0551640301OBX000CALIND0000.FIT fullpath=no \
observationdate=2008-08-11T16:05:17.000 withccfpath=no -w 10
# # [OUTPUT] [2024-11-30T23:45:17]
# # [INFO] [2024-11-30T23:45:17] Task Run Time cifbuild 30.8334591388702s
#
# [COMMAND] [2024-11-30T23:45:17]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:45:17]
export SAS_RAND_SEED=0551640301
# # [INFO] [2024-11-30T23:45:17] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0551640301
# [COMMAND] [2024-11-30T23:45:17]
addattribute attributecomment="\"Telescope (mission) name\" \"RA of instrument pointing (degrees)\" \"Date observations ended\" \
\"Observation identifier\" \"Observation mode (pointing or slew)\" \"DEC of instrument pointing\" \"Date observations were made\" \
\"Name of PI\" \"Name of observed object\"" attributename="TELESCOP RA_PNT DATE-END OBS_ID OBS_MODE DEC_PNT DATE-OBS OBSERVER \
OBJECT" attributetype="string real string string string real string string string" realvalue="240.772875 -40.3070000" \
set=product/P0551640301OBX000CALIND0000.FIT stringvalue="\"XMM\" \"2008-08-11T17:04:10.000\" \"0551640301\" \"POINTED\" \
\"2008-08-11T16:05:17.000\" \"Dr Nicolas Grosso\" \"EX Lupi\"" -w 10
# # [OUTPUT] [2024-11-30T23:45:17]
# # [INFO] [2024-11-30T23:45:17] Task Run Time addattribute 0.0473549365997314s
#
# [COMMAND] [2024-11-30T23:45:17]
cp /scratch/225905.1.all.q/xmm/ppsprod/229049/product/P0551640301OBX000CALIND0000.FIT \
/scratch/225905.1.all.q/xmm/ppsprod/229049/intermediate/ccf.cif
# # [INFO] [2024-11-30T23:45:17] System RV 0
# # [INFO] [2024-11-30T23:45:17] Module name: GlobalHK
# # [INFO] [2024-11-30T23:45:17] Instrument: all
# # [INFO] [2024-11-30T23:45:17] Stream no.: 0001
# # [INFO] [2024-11-30T23:45:17] Module version number: 1.81
# [COMMAND] [2024-11-30T23:45:17]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:45:17]
export SAS_RAND_SEED=0551640301
# # [INFO] [2024-11-30T23:45:17] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0551640301
# [COMMAND] [2024-11-30T23:45:17]
preqgti preqgtifile=intermediate/GlobalHK-all-1-Attitude_GTI-X00000000000000.fits -w 10
# # [OUTPUT] [2024-11-30T23:45:17]
# # [INFO] [2024-11-30T23:45:17] Task Run Time preqgti 0.292114973068237s
#
# [COMMAND] [2024-11-30T23:45:17]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:45:17]
export SAS_RAND_SEED=0551640301
# # [INFO] [2024-11-30T23:45:17] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0551640301
# [COMMAND] [2024-11-30T23:45:17]
atthkgen atthkset=product/P0551640301OBX000ATTTSR0000.FIT preqgtifile=intermediate/GlobalHK-all-1-Attitude_GTI-X00000000000000.fits \
timestep=1 withpreqgti=no -w 10
# # [OUTPUT] [2024-11-30T23:45:17]
# # [INFO] [2024-11-30T23:45:17] Task Run Time atthkgen 0.202054023742676s
#
# [COMMAND] [2024-11-30T23:45:17]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:45:17]
export SAS_RAND_SEED=0551640301
# # [INFO] [2024-11-30T23:45:17] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0551640301
# [COMMAND] [2024-11-30T23:45:17]
orbit outfile=product/P0551640301OBX000ORBTSR0000.FIT timestep=1 useobsid=yes -w 10
# # [OUTPUT] [2024-11-30T23:45:17] orbit:- Output FITS Orbit timeseries: product/P0551640301OBX000ORBTSR0000.FIT
# orbit:- Binsize (timestep) of output): 1
# orbit:- Use OBSID data or whole orbit? T 
# # [INFO] [2024-11-30T23:45:17] Task Run Time orbit 0.231503009796143s
#
# [COMMAND] [2024-11-30T23:45:17]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:45:17]
export SAS_RAND_SEED=0551640301
# # [INFO] [2024-11-30T23:45:17] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0551640301
# [COMMAND] [2024-11-30T23:45:17]
radmonfix output=product/P0551640301OBX000RADMON0000.FIT radmonlist=odf/1588_0551640301_RMX00100ECX.FIT withoutputfile=yes -w 10
# # [OUTPUT] [2024-11-30T23:45:18] ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=256091385.9 which\
#     is outside the time correlation data abscissa range [256093380.9, 256098872.9] - result of extrapolation might be afflicted\
#     with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=256091389.9 which is outside the time correlation\
#     data abscissa range [256093380.9, 256098872.9] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=256091393.9 which is outside the time correlation\
#     data abscissa range [256093380.9, 256098872.9] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=256091397.9 which is outside the time correlation\
#     data abscissa range [256093380.9, 256098872.9] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=256091401.9 which is outside the time correlation\
#     data abscissa range [256093380.9, 256098872.9] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=256091405.9 which is outside the time correlation\
#     data abscissa range [256093380.9, 256098872.9] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=256091409.9 which is outside the time correlation\
#     data abscissa range [256093380.9, 256098872.9] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=256091413.9 which is outside the time correlation\
#     data abscissa range [256093380.9, 256098872.9] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=256091417.9 which is outside the time correlation\
#     data abscissa range [256093380.9, 256098872.9] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=256091421.9 which is outside the time correlation\
#     data abscissa range [256093380.9, 256098872.9] - result of extrapolation might be afflicted with large numerical uncertainty.
# radmonfix:- Setting DATE-END...
# ** radmonfix: warning (SummaryOfWarnings), 
# warning Extrapolation silently occurred 517 times 
# # [INFO] [2024-11-30T23:45:18] Task Run Time radmonfix 0.184319972991943s
#
# [COMMAND] [2024-11-30T23:45:18]
cp /lhome/jperea/ppsdev/pcms3/src/pipeline/etc/EPICModes.fits \
/scratch/225905.1.all.q/xmm/ppsprod/229049/intermediate/GlobalHK-all-1-Observing_modes_Pileup_and_OoT_data-X00000000000000.fits
# # [INFO] [2024-11-30T23:45:18] System RV 0
# # [INFO] [2024-11-30T23:45:18] Copied EPIC Observing modes table, Pileup data and OoT data table in place
# [COMMAND] [2024-11-30T23:45:18]
cp /lhome/jperea/ppsdev/pcms3/src/pipeline/etc/ecfs.fits \
/scratch/225905.1.all.q/xmm/ppsprod/229049/intermediate/GlobalHK-all-1-Energy_Conversion_Factors-X00000000000000.fits
# # [INFO] [2024-11-30T23:45:18] System RV 0
# [COMMAND] [2024-11-30T23:45:18]
cp /lhome/jperea/ppsdev/pcms3/src/pipeline/etc/ecfgrid.fits.gz \
/scratch/225905.1.all.q/xmm/ppsprod/229049/intermediate/GlobalHK-all-1-Energy_Conversion_Factors_Grid-X00000000000000.fits
# # [INFO] [2024-11-30T23:45:18] System RV 0
# [COMMAND] [2024-11-30T23:45:18]
cp /lhome/jperea/ppsdev/pcms3/src/pipeline/etc/fluxgrid.fits.gz \
/scratch/225905.1.all.q/xmm/ppsprod/229049/intermediate/GlobalHK-all-1-Flux_Grid-X00000000000000.fits
# # [INFO] [2024-11-30T23:45:18] System RV 0
# # [INFO] [2024-11-30T23:45:18] Module name: ExpChooser
# # [INFO] [2024-11-30T23:45:18] Instrument: emos1
# # [INFO] [2024-11-30T23:45:18] Stream no.: 0001
# # [INFO] [2024-11-30T23:45:18] Module version number: 1.38
# # [INFO] [2024-11-30T23:45:18] Checking exposure S001 for processability
# # [INFO] [2024-11-30T23:45:18] Filter: CalClosed
# # [INFO] [2024-11-30T23:45:18] Instrument mode: PrimeFullWindow
# # [INFO] [2024-11-30T23:45:18] Exposure duration: 3520
# # [INFO] [2024-11-30T23:45:18] Exposure ignored due to invalid or unsupported filter
# # [INFO] [2024-11-30T23:45:18] Module name: ExpChooser
# # [INFO] [2024-11-30T23:45:18] Instrument: emos2
# # [INFO] [2024-11-30T23:45:18] Stream no.: 0001
# # [INFO] [2024-11-30T23:45:18] Module version number: 1.38
# # [INFO] [2024-11-30T23:45:18] Checking exposure S002 for processability
# # [INFO] [2024-11-30T23:45:18] Filter: CalClosed
# # [INFO] [2024-11-30T23:45:18] Instrument mode: PrimeFullWindow
# # [INFO] [2024-11-30T23:45:18] Exposure duration: 3533
# # [INFO] [2024-11-30T23:45:18] Exposure ignored due to invalid or unsupported filter
