
#!/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:52:41] Module name: VerifyODF
# # [INFO] [2024-11-30T23:52:41] Instrument: all
# # [INFO] [2024-11-30T23:52:41] Stream no.: 0001
# # [INFO] [2024-11-30T23:52:41] Module version number: 1.18
# # [INFO] [2024-11-30T23:52:41] Version of odfingest used was 3.33.1
# # [INFO] [2024-11-30T23:52:41] Module name: MakeCIF
# # [INFO] [2024-11-30T23:52:41] Instrument: all
# # [INFO] [2024-11-30T23:52:41] Stream no.: 0001
# # [INFO] [2024-11-30T23:52:41] Module version number: 1.23
# # [INFO] [2024-11-30T23:52:41] Observation start defined as >2008-01-09T06:57:12.000<
# # [INFO] [2024-11-30T23:52:41] Processing date defined as >2024-12-01T00:52:41<
# [COMMAND] [2024-11-30T23:52:41]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:52:41]
export SAS_RAND_SEED=0505211101
# # [INFO] [2024-11-30T23:52:41] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0505211101
# [COMMAND] [2024-11-30T23:52:41]
cifbuild analysisdate=2024-12-01T00:52:41 calindexset=product/P0505211101OBX000CALIND0000.FIT fullpath=no \
observationdate=2008-01-09T06:57:12.000 withccfpath=no -w 10
# # [OUTPUT] [2024-11-30T23:53:09]
# # [INFO] [2024-11-30T23:53:09] Task Run Time cifbuild 28.5210340023041s
#
# [COMMAND] [2024-11-30T23:53:09]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:53:09]
export SAS_RAND_SEED=0505211101
# # [INFO] [2024-11-30T23:53:09] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0505211101
# [COMMAND] [2024-11-30T23:53:09]
addattribute attributecomment="\"Telescope (mission) name\" \"Date observations were made\" \"RA of instrument pointing (degrees)\" \
\"Date observations ended\" \"Name of observed object\" \"Observation mode (pointing or slew)\" \"Name of PI\" \"Observation \
identifier\" \"DEC of instrument pointing\"" attributename="TELESCOP DATE-OBS RA_PNT DATE-END OBJECT OBS_MODE OBSERVER OBS_ID \
DEC_PNT" attributetype="string string real string string string string string real" realvalue="\"356.2332915\" \"9.1951944\"" \
set=product/P0505211101OBX000CALIND0000.FIT stringvalue="\"XMM\" \"2008-01-09T06:57:12.000\" \"2008-01-09T07:36:03.000\" \"A2657\" \
\"POINTED\" \"Dr Thomas Reiprich\" \"0505211101\"" -w 10
# # [OUTPUT] [2024-11-30T23:53:09]
# # [INFO] [2024-11-30T23:53:09] Task Run Time addattribute 0.0332748889923096s
#
# [COMMAND] [2024-11-30T23:53:09]
cp /scratch/226571.1.all.q/xmm/ppsprod/229716/product/P0505211101OBX000CALIND0000.FIT \
/scratch/226571.1.all.q/xmm/ppsprod/229716/intermediate/ccf.cif
# # [INFO] [2024-11-30T23:53:09] System RV 0
# # [INFO] [2024-11-30T23:53:09] Module name: GlobalHK
# # [INFO] [2024-11-30T23:53:09] Instrument: all
# # [INFO] [2024-11-30T23:53:09] Stream no.: 0001
# # [INFO] [2024-11-30T23:53:09] Module version number: 1.81
# [COMMAND] [2024-11-30T23:53:09]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:53:09]
export SAS_RAND_SEED=0505211101
# # [INFO] [2024-11-30T23:53:09] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0505211101
# [COMMAND] [2024-11-30T23:53:09]
preqgti preqgtifile=intermediate/GlobalHK-all-1-Attitude_GTI-X00000000000000.fits -w 10
# # [OUTPUT] [2024-11-30T23:53:10] ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 316239470.184\
#     which is more than 20 s outside the period for which the attitude is known (closest time is -31 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 316239470.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is -31 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 316239471.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is -30 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 316239471.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is -30 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 316239472.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is -29 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 316239472.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is -29 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 316239473.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is -28 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 316239473.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is -28 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 316239474.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is -27 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 316239474.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is -27 s away).
# ** preqgti: warning (SummaryOfWarnings), 
# warning NoAttitude silently occurred 18 times 
# # [INFO] [2024-11-30T23:53:10] Task Run Time preqgti 0.467345952987671s
#
# [COMMAND] [2024-11-30T23:53:10]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:53:10]
export SAS_RAND_SEED=0505211101
# # [INFO] [2024-11-30T23:53:10] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0505211101
# [COMMAND] [2024-11-30T23:53:10]
atthkgen atthkset=product/P0505211101OBX000ATTTSR0000.FIT preqgtifile=intermediate/GlobalHK-all-1-Attitude_GTI-X00000000000000.fits \
timestep=1 withpreqgti=no -w 10
# # [OUTPUT] [2024-11-30T23:53:10]
# # [INFO] [2024-11-30T23:53:10] Task Run Time atthkgen 0.177644968032837s
#
# [COMMAND] [2024-11-30T23:53:10]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:53:10]
export SAS_RAND_SEED=0505211101
# # [INFO] [2024-11-30T23:53:10] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0505211101
# [COMMAND] [2024-11-30T23:53:10]
orbit outfile=product/P0505211101OBX000ORBTSR0000.FIT timestep=1 useobsid=yes -w 10
# # [OUTPUT] [2024-11-30T23:53:10] orbit:- Output FITS Orbit timeseries: product/P0505211101OBX000ORBTSR0000.FIT
# orbit:- Binsize (timestep) of output): 1
# orbit:- Use OBSID data or whole orbit? T 
# # [INFO] [2024-11-30T23:53:10] Task Run Time orbit 0.145052909851074s
#
# [COMMAND] [2024-11-30T23:53:10]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:53:10]
export SAS_RAND_SEED=0505211101
# # [INFO] [2024-11-30T23:53:10] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0505211101
# [COMMAND] [2024-11-30T23:53:10]
radmonfix output=product/P0505211101OBX000RADMON0000.FIT radmonlist=odf/1480_0505211101_RMX00100ECX.FIT withoutputfile=yes -w 10
# # [OUTPUT] [2024-11-30T23:53:10] ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=237483221.9 which\
#     is outside the time correlation data abscissa range [237484692.6, 237488973.5] - result of extrapolation might be afflicted\
#     with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=237483225.9 which is outside the time correlation\
#     data abscissa range [237484692.6, 237488973.5] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=237483229.9 which is outside the time correlation\
#     data abscissa range [237484692.6, 237488973.5] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=237483233.9 which is outside the time correlation\
#     data abscissa range [237484692.6, 237488973.5] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=237483237.9 which is outside the time correlation\
#     data abscissa range [237484692.6, 237488973.5] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=237483241.9 which is outside the time correlation\
#     data abscissa range [237484692.6, 237488973.5] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=237483245.9 which is outside the time correlation\
#     data abscissa range [237484692.6, 237488973.5] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=237483249.9 which is outside the time correlation\
#     data abscissa range [237484692.6, 237488973.5] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=237483253.9 which is outside the time correlation\
#     data abscissa range [237484692.6, 237488973.5] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=237483257.9 which is outside the time correlation\
#     data abscissa range [237484692.6, 237488973.5] - result of extrapolation might be afflicted with large numerical uncertainty.
# radmonfix:- Setting DATE-END...
# ** radmonfix: warning (SummaryOfWarnings), 
# warning Extrapolation silently occurred 411 times 
# # [INFO] [2024-11-30T23:53:10] Task Run Time radmonfix 0.138107061386108s
#
# [COMMAND] [2024-11-30T23:53:10]
cp /lhome/jperea/ppsdev/pcms3/src/pipeline/etc/EPICModes.fits \
/scratch/226571.1.all.q/xmm/ppsprod/229716/intermediate/GlobalHK-all-1-Observing_modes_Pileup_and_OoT_data-X00000000000000.fits
# # [INFO] [2024-11-30T23:53:10] System RV 0
# # [INFO] [2024-11-30T23:53:10] Copied EPIC Observing modes table, Pileup data and OoT data table in place
# [COMMAND] [2024-11-30T23:53:10]
cp /lhome/jperea/ppsdev/pcms3/src/pipeline/etc/ecfs.fits \
/scratch/226571.1.all.q/xmm/ppsprod/229716/intermediate/GlobalHK-all-1-Energy_Conversion_Factors-X00000000000000.fits
# # [INFO] [2024-11-30T23:53:10] System RV 0
# [COMMAND] [2024-11-30T23:53:10]
cp /lhome/jperea/ppsdev/pcms3/src/pipeline/etc/ecfgrid.fits.gz \
/scratch/226571.1.all.q/xmm/ppsprod/229716/intermediate/GlobalHK-all-1-Energy_Conversion_Factors_Grid-X00000000000000.fits
# # [INFO] [2024-11-30T23:53:10] System RV 0
# [COMMAND] [2024-11-30T23:53:10]
cp /lhome/jperea/ppsdev/pcms3/src/pipeline/etc/fluxgrid.fits.gz \
/scratch/226571.1.all.q/xmm/ppsprod/229716/intermediate/GlobalHK-all-1-Flux_Grid-X00000000000000.fits
# # [INFO] [2024-11-30T23:53:10] System RV 0
# # [INFO] [2024-11-30T23:53:10] Module name: ExpChooser
# # [INFO] [2024-11-30T23:53:10] Instrument: emos1
# # [INFO] [2024-11-30T23:53:10] Stream no.: 0001
# # [INFO] [2024-11-30T23:53:10] Module version number: 1.38
# # [INFO] [2024-11-30T23:53:10] Checking exposure S003 for processability
# # [INFO] [2024-11-30T23:53:10] Filter: CalClosed
# # [INFO] [2024-11-30T23:53:10] Instrument mode: PrimeFullWindow
# # [INFO] [2024-11-30T23:53:10] Exposure duration: 2321
# # [INFO] [2024-11-30T23:53:10] Exposure ignored due to invalid or unsupported filter
# # [INFO] [2024-11-30T23:53:10] Module name: ExpChooser
# # [INFO] [2024-11-30T23:53:10] Instrument: emos2
# # [INFO] [2024-11-30T23:53:10] Stream no.: 0001
# # [INFO] [2024-11-30T23:53:10] Module version number: 1.38
# # [INFO] [2024-11-30T23:53:10] Checking exposure S004 for processability
# # [INFO] [2024-11-30T23:53:10] Filter: CalClosed
# # [INFO] [2024-11-30T23:53:10] Instrument mode: PrimeFullWindow
# # [INFO] [2024-11-30T23:53:10] Exposure duration: 2331
# # [INFO] [2024-11-30T23:53:10] Exposure ignored due to invalid or unsupported filter
