
#!/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:56:33] Module name: VerifyODF
# # [INFO] [2024-11-30T23:56:33] Instrument: all
# # [INFO] [2024-11-30T23:56:33] Stream no.: 0001
# # [INFO] [2024-11-30T23:56:33] Module version number: 1.18
# # [INFO] [2024-11-30T23:56:33] Version of odfingest used was 3.33.1
# # [INFO] [2024-11-30T23:56:33] Module name: MakeCIF
# # [INFO] [2024-11-30T23:56:33] Instrument: all
# # [INFO] [2024-11-30T23:56:33] Stream no.: 0001
# # [INFO] [2024-11-30T23:56:33] Module version number: 1.23
# # [INFO] [2024-11-30T23:56:33] Observation start defined as >2005-04-13T12:29:45.000<
# # [INFO] [2024-11-30T23:56:33] Processing date defined as >2024-12-01T00:56:33<
# [COMMAND] [2024-11-30T23:56:33]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:56:33]
export SAS_RAND_SEED=0304202101
# # [INFO] [2024-11-30T23:56:33] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0304202101
# [COMMAND] [2024-11-30T23:56:33]
cifbuild analysisdate=2024-12-01T00:56:33 calindexset=product/P0304202101OBX000CALIND0000.FIT fullpath=no \
observationdate=2005-04-13T12:29:45.000 withccfpath=no -w 10
# # [OUTPUT] [2024-11-30T23:57:03]
# # [INFO] [2024-11-30T23:57:03] Task Run Time cifbuild 30.2312340736389s
#
# [COMMAND] [2024-11-30T23:57:03]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:57:03]
export SAS_RAND_SEED=0304202101
# # [INFO] [2024-11-30T23:57:03] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0304202101
# [COMMAND] [2024-11-30T23:57:03]
addattribute attributecomment="\"Telescope (mission) name\" \"Name of observed object\" \"Date observations ended\" \"Name of PI\" \
\"RA of instrument pointing (degrees)\" \"DEC of instrument pointing\" \"Date observations were made\" \"Observation mode (pointing \
or slew)\" \"Observation identifier\"" attributename="TELESCOP OBJECT DATE-END OBSERVER RA_PNT DEC_PNT DATE-OBS OBS_MODE OBS_ID" \
attributetype="string string string string real real string string string" realvalue="343.6645005 -70.0736945" \
set=product/P0304202101OBX000CALIND0000.FIT stringvalue="\"XMM\" \"HD 216437\" \"2005-04-13T14:11:06.000\" \"Dr Vinay Kashyap\" \
\"2005-04-13T12:29:45.000\" \"POINTED\" \"0304202101\"" -w 10
# # [OUTPUT] [2024-11-30T23:57:03]
# # [INFO] [2024-11-30T23:57:03] Task Run Time addattribute 0.0602760314941406s
#
# [COMMAND] [2024-11-30T23:57:03]
cp /scratch/226879.1.all.q/xmm/ppsprod/230024/product/P0304202101OBX000CALIND0000.FIT \
/scratch/226879.1.all.q/xmm/ppsprod/230024/intermediate/ccf.cif
# # [INFO] [2024-11-30T23:57:03] System RV 0
# # [INFO] [2024-11-30T23:57:03] Module name: GlobalHK
# # [INFO] [2024-11-30T23:57:03] Instrument: all
# # [INFO] [2024-11-30T23:57:03] Stream no.: 0001
# # [INFO] [2024-11-30T23:57:03] Module version number: 1.81
# [COMMAND] [2024-11-30T23:57:03]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:57:03]
export SAS_RAND_SEED=0304202101
# # [INFO] [2024-11-30T23:57:03] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0304202101
# [COMMAND] [2024-11-30T23:57:03]
preqgti preqgtifile=intermediate/GlobalHK-all-1-Attitude_GTI-X00000000000000.fits -w 10
# # [OUTPUT] [2024-11-30T23:57:04] ** preqgti: warning (TemporalOverlapInAHF), Temporal overlap of 0.25s between AHF entries 408\
#     (2005-04-13T13:10:34.999) and 409 (2005-04-13T13:10:43.000) - adjusting duration of entry 408 accordingly
# ** preqgti::atthkgen: warning (TemporalOverlapInAHF), Temporal overlap of 0.25s between AHF entries 408 (2005-04-13T13:10:34.999)\
#     and 409 (2005-04-13T13:10:43.000) - adjusting duration of entry 408 accordingly
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 229795326.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is 20.9999999702 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 229795326.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is 20.9999999702 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 229795327.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is 20.9999999702 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 229795327.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is 20.9999999702 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 229795328.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is 20.9999999702 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 229795328.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is 20.9999999702 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 229795329.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is 20.9999999702 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 229795329.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is 20.9999999702 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 229795330.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is 21.9999999702 s away).
# ** preqgti::atthkgen: warning (NoAttitude), The attitude was requested for time 229795330.184 which is more than 20 s outside the\
#     period for which the attitude is known (closest time is 21.9999999702 s away).
# ** preqgti: warning (SummaryOfWarnings), 
# warning NoAttitude silently occurred 6026 times 
# # [INFO] [2024-11-30T23:57:04] Task Run Time preqgti 0.45858097076416s
#
# [COMMAND] [2024-11-30T23:57:04]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:57:04]
export SAS_RAND_SEED=0304202101
# # [INFO] [2024-11-30T23:57:04] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0304202101
# [COMMAND] [2024-11-30T23:57:04]
atthkgen atthkset=product/P0304202101OBX000ATTTSR0000.FIT preqgtifile=intermediate/GlobalHK-all-1-Attitude_GTI-X00000000000000.fits \
timestep=1 withpreqgti=no -w 10
# # [OUTPUT] [2024-11-30T23:57:04] ** atthkgen: warning (TemporalOverlapInAHF), Temporal overlap of 0.25s between AHF entries 408\
#     (2005-04-13T13:10:34.999) and 409 (2005-04-13T13:10:43.000) - adjusting duration of entry 408 accordingly 
# # [INFO] [2024-11-30T23:57:04] Task Run Time atthkgen 0.197601079940796s
#
# [COMMAND] [2024-11-30T23:57:04]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:57:04]
export SAS_RAND_SEED=0304202101
# # [INFO] [2024-11-30T23:57:04] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0304202101
# [COMMAND] [2024-11-30T23:57:04]
orbit outfile=product/P0304202101OBX000ORBTSR0000.FIT timestep=1 useobsid=yes -w 10
# # [OUTPUT] [2024-11-30T23:57:04] orbit:- Output FITS Orbit timeseries: product/P0304202101OBX000ORBTSR0000.FIT
# orbit:- Binsize (timestep) of output): 1
# orbit:- Use OBSID data or whole orbit? T
# ** orbit: warning (TemporalOverlapInAHF), Temporal overlap of 0.25s between AHF entries 408 (2005-04-13T13:10:34.999) and 409\
#     (2005-04-13T13:10:43.000) - adjusting duration of entry 408 accordingly 
# # [INFO] [2024-11-30T23:57:04] Task Run Time orbit 0.254215955734253s
#
# [COMMAND] [2024-11-30T23:57:04]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:57:04]
export SAS_RAND_SEED=0304202101
# # [INFO] [2024-11-30T23:57:04] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0304202101
# [COMMAND] [2024-11-30T23:57:04]
radmonfix output=product/P0304202101OBX000RADMON0000.FIT radmonlist="odf/0979_0304202101_RMX00100ECX.FIT \
odf/0979_0304202101_RMX00200ECX.FIT" withoutputfile=yes -w 10
# # [OUTPUT] [2024-11-30T23:57:04] ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=151018909.9 which\
#     is outside the time correlation data abscissa range [151019018.4, 151026990.6] - result of extrapolation might be afflicted\
#     with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=151018913.9 which is outside the time correlation\
#     data abscissa range [151019018.4, 151026990.6] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=151018917.9 which is outside the time correlation\
#     data abscissa range [151019018.4, 151026990.6] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=151027093.9 which is outside the time correlation\
#     data abscissa range [151019018.4, 151026990.6] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=151027097.9 which is outside the time correlation\
#     data abscissa range [151019018.4, 151026990.6] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=151027101.9 which is outside the time correlation\
#     data abscissa range [151019018.4, 151026990.6] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=151027105.9 which is outside the time correlation\
#     data abscissa range [151019018.4, 151026990.6] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=151027109.9 which is outside the time correlation\
#     data abscissa range [151019018.4, 151026990.6] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=151027113.9 which is outside the time correlation\
#     data abscissa range [151019018.4, 151026990.6] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=151027117.9 which is outside the time correlation\
#     data abscissa range [151019018.4, 151026990.6] - result of extrapolation might be afflicted with large numerical uncertainty.
# radmonfix:- Adding 2176 counts rows from row 141
# radmonfix:- Setting DATE-END...
# ** radmonfix: warning (SummaryOfWarnings), 
# warning Extrapolation silently occurred 264 times 
# # [INFO] [2024-11-30T23:57:04] Task Run Time radmonfix 0.145978927612305s
#
# [COMMAND] [2024-11-30T23:57:04]
cp /lhome/jperea/ppsdev/pcms3/src/pipeline/etc/EPICModes.fits \
/scratch/226879.1.all.q/xmm/ppsprod/230024/intermediate/GlobalHK-all-1-Observing_modes_Pileup_and_OoT_data-X00000000000000.fits
# # [INFO] [2024-11-30T23:57:04] System RV 0
# # [INFO] [2024-11-30T23:57:04] Copied EPIC Observing modes table, Pileup data and OoT data table in place
# [COMMAND] [2024-11-30T23:57:04]
cp /lhome/jperea/ppsdev/pcms3/src/pipeline/etc/ecfs.fits \
/scratch/226879.1.all.q/xmm/ppsprod/230024/intermediate/GlobalHK-all-1-Energy_Conversion_Factors-X00000000000000.fits
# # [INFO] [2024-11-30T23:57:05] System RV 0
# [COMMAND] [2024-11-30T23:57:05]
cp /lhome/jperea/ppsdev/pcms3/src/pipeline/etc/ecfgrid.fits.gz \
/scratch/226879.1.all.q/xmm/ppsprod/230024/intermediate/GlobalHK-all-1-Energy_Conversion_Factors_Grid-X00000000000000.fits
# # [INFO] [2024-11-30T23:57:05] System RV 0
# [COMMAND] [2024-11-30T23:57:05]
cp /lhome/jperea/ppsdev/pcms3/src/pipeline/etc/fluxgrid.fits.gz \
/scratch/226879.1.all.q/xmm/ppsprod/230024/intermediate/GlobalHK-all-1-Flux_Grid-X00000000000000.fits
# # [INFO] [2024-11-30T23:57:05] System RV 0
# # [INFO] [2024-11-30T23:57:05] Module name: ExpChooser
# # [INFO] [2024-11-30T23:57:05] Instrument: emos1
# # [INFO] [2024-11-30T23:57:05] Stream no.: 0001
# # [INFO] [2024-11-30T23:57:05] Module version number: 1.38
# # [INFO] [2024-11-30T23:57:05] Checking exposure S003 for processability
# # [INFO] [2024-11-30T23:57:05] Filter: CalClosed
# # [INFO] [2024-11-30T23:57:05] Instrument mode: PrimeFullWindow
# # [INFO] [2024-11-30T23:57:05] Exposure duration: 6073
# # [INFO] [2024-11-30T23:57:05] Exposure ignored due to invalid or unsupported filter
# # [INFO] [2024-11-30T23:57:05] Module name: ExpChooser
# # [INFO] [2024-11-30T23:57:05] Instrument: emos2
# # [INFO] [2024-11-30T23:57:05] Stream no.: 0001
# # [INFO] [2024-11-30T23:57:05] Module version number: 1.38
# # [INFO] [2024-11-30T23:57:05] Checking exposure S004 for processability
# # [INFO] [2024-11-30T23:57:05] Filter: CalClosed
# # [INFO] [2024-11-30T23:57:05] Instrument mode: PrimeFullWindow
# # [INFO] [2024-11-30T23:57:05] Exposure duration: 6081
# # [INFO] [2024-11-30T23:57:05] Exposure ignored due to invalid or unsupported filter
