
#!/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:50] Module name: VerifyODF
# # [INFO] [2024-11-30T23:52:50] Instrument: all
# # [INFO] [2024-11-30T23:52:50] Stream no.: 0001
# # [INFO] [2024-11-30T23:52:50] Module version number: 1.18
# # [INFO] [2024-11-30T23:52:50] Version of odfingest used was 3.33.1
# # [INFO] [2024-11-30T23:52:50] Module name: MakeCIF
# # [INFO] [2024-11-30T23:52:50] Instrument: all
# # [INFO] [2024-11-30T23:52:50] Stream no.: 0001
# # [INFO] [2024-11-30T23:52:50] Module version number: 1.23
# # [INFO] [2024-11-30T23:52:50] Observation start defined as >2005-09-17T15:06:41.000<
# # [INFO] [2024-11-30T23:52:50] Processing date defined as >2024-12-01T00:52:50<
# [COMMAND] [2024-11-30T23:52:50]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:52:50]
export SAS_RAND_SEED=0306680401
# # [INFO] [2024-11-30T23:52:50] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0306680401
# [COMMAND] [2024-11-30T23:52:50]
cifbuild analysisdate=2024-12-01T00:52:50 calindexset=product/P0306680401OBX000CALIND0000.FIT fullpath=no \
observationdate=2005-09-17T15:06:41.000 withccfpath=no -w 10
# # [OUTPUT] [2024-11-30T23:53:20]
# # [INFO] [2024-11-30T23:53:20] Task Run Time cifbuild 30.4373600482941s
#
# [COMMAND] [2024-11-30T23:53:20]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:53:20]
export SAS_RAND_SEED=0306680401
# # [INFO] [2024-11-30T23:53:20] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0306680401
# [COMMAND] [2024-11-30T23:53:20]
addattribute attributecomment="\"Telescope (mission) name\" \"Name of PI\" \"Observation mode (pointing or slew)\" \"Observation \
identifier\" \"Name of observed object\" \"RA of instrument pointing (degrees)\" \"DEC of instrument pointing\" \"Date observations \
ended\" \"Date observations were made\"" attributename="TELESCOP OBSERVER OBS_MODE OBS_ID OBJECT RA_PNT DEC_PNT DATE-END DATE-OBS" \
attributetype="string string string string string real real string string" realvalue="\"161.9915835\" \"74.3248889\"" \
set=product/P0306680401OBX000CALIND0000.FIT stringvalue="\"XMM\" \"Prof Mark Birkinshaw\" \"POINTED\" \"0306680401\" \"J1047+743\" \
\"2005-09-17T16:24:43.000\" \"2005-09-17T15:06:41.000\"" -w 10
# # [OUTPUT] [2024-11-30T23:53:20]
# # [INFO] [2024-11-30T23:53:20] Task Run Time addattribute 0.0380611419677734s
#
# [COMMAND] [2024-11-30T23:53:20]
cp /scratch/226601.1.all.q/xmm/ppsprod/229747/product/P0306680401OBX000CALIND0000.FIT \
/scratch/226601.1.all.q/xmm/ppsprod/229747/intermediate/ccf.cif
# # [INFO] [2024-11-30T23:53:20] System RV 0
# # [INFO] [2024-11-30T23:53:20] Module name: GlobalHK
# # [INFO] [2024-11-30T23:53:20] Instrument: all
# # [INFO] [2024-11-30T23:53:20] Stream no.: 0001
# # [INFO] [2024-11-30T23:53:20] Module version number: 1.81
# [COMMAND] [2024-11-30T23:53:20]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:53:20]
export SAS_RAND_SEED=0306680401
# # [INFO] [2024-11-30T23:53:20] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0306680401
# [COMMAND] [2024-11-30T23:53:20]
preqgti preqgtifile=intermediate/GlobalHK-all-1-Attitude_GTI-X00000000000000.fits -w 10
# # [OUTPUT] [2024-11-30T23:53:21]
# # [INFO] [2024-11-30T23:53:21] Task Run Time preqgti 0.433096885681152s
#
# [COMMAND] [2024-11-30T23:53:21]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:53:21]
export SAS_RAND_SEED=0306680401
# # [INFO] [2024-11-30T23:53:21] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0306680401
# [COMMAND] [2024-11-30T23:53:21]
atthkgen atthkset=product/P0306680401OBX000ATTTSR0000.FIT preqgtifile=intermediate/GlobalHK-all-1-Attitude_GTI-X00000000000000.fits \
timestep=1 withpreqgti=no -w 10
# # [OUTPUT] [2024-11-30T23:53:21]
# # [INFO] [2024-11-30T23:53:21] Task Run Time atthkgen 0.249916076660156s
#
# [COMMAND] [2024-11-30T23:53:21]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:53:21]
export SAS_RAND_SEED=0306680401
# # [INFO] [2024-11-30T23:53:21] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0306680401
# [COMMAND] [2024-11-30T23:53:21]
orbit outfile=product/P0306680401OBX000ORBTSR0000.FIT timestep=1 useobsid=yes -w 10
# # [OUTPUT] [2024-11-30T23:53:21] orbit:- Output FITS Orbit timeseries: product/P0306680401OBX000ORBTSR0000.FIT
# orbit:- Binsize (timestep) of output): 1
# orbit:- Use OBSID data or whole orbit? T 
# # [INFO] [2024-11-30T23:53:21] Task Run Time orbit 0.277039051055908s
#
# [COMMAND] [2024-11-30T23:53:21]
export SAS_MEMORY_MODEL=high
# [COMMAND] [2024-11-30T23:53:21]
export SAS_RAND_SEED=0306680401
# # [INFO] [2024-11-30T23:53:21] ## DEBUG ModuleResources: SAS_RAND_SEED set: 0306680401
# [COMMAND] [2024-11-30T23:53:21]
radmonfix output=product/P0306680401OBX000RADMON0000.FIT radmonlist=odf/1057_0306680401_RMX00100ECX.FIT withoutputfile=yes -w 10
# # [OUTPUT] [2024-11-30T23:53:21] ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=164592593.9 which\
#     is outside the time correlation data abscissa range [164593108.8, 164599693.8] - result of extrapolation might be afflicted\
#     with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=164592597.9 which is outside the time correlation\
#     data abscissa range [164593108.8, 164599693.8] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=164592601.9 which is outside the time correlation\
#     data abscissa range [164593108.8, 164599693.8] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=164592605.9 which is outside the time correlation\
#     data abscissa range [164593108.8, 164599693.8] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=164592609.9 which is outside the time correlation\
#     data abscissa range [164593108.8, 164599693.8] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=164592613.9 which is outside the time correlation\
#     data abscissa range [164593108.8, 164599693.8] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=164592617.9 which is outside the time correlation\
#     data abscissa range [164593108.8, 164599693.8] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=164592621.9 which is outside the time correlation\
#     data abscissa range [164593108.8, 164599693.8] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=164592625.9 which is outside the time correlation\
#     data abscissa range [164593108.8, 164599693.8] - result of extrapolation might be afflicted with large numerical uncertainty.
# ** radmonfix: warning (Extrapolation), Evaluating OBT-MET fit polynomial at x=164592629.9 which is outside the time correlation\
#     data abscissa range [164593108.8, 164599693.8] - result of extrapolation might be afflicted with large numerical uncertainty.
# radmonfix:- Setting DATE-END...
# ** radmonfix: warning (SummaryOfWarnings), 
# warning Extrapolation silently occurred 103 times 
# # [INFO] [2024-11-30T23:53:21] Task Run Time radmonfix 0.164135932922363s
#
# [COMMAND] [2024-11-30T23:53:21]
cp /lhome/jperea/ppsdev/pcms3/src/pipeline/etc/EPICModes.fits \
/scratch/226601.1.all.q/xmm/ppsprod/229747/intermediate/GlobalHK-all-1-Observing_modes_Pileup_and_OoT_data-X00000000000000.fits
# # [INFO] [2024-11-30T23:53:21] System RV 0
# # [INFO] [2024-11-30T23:53:21] Copied EPIC Observing modes table, Pileup data and OoT data table in place
# [COMMAND] [2024-11-30T23:53:21]
cp /lhome/jperea/ppsdev/pcms3/src/pipeline/etc/ecfs.fits \
/scratch/226601.1.all.q/xmm/ppsprod/229747/intermediate/GlobalHK-all-1-Energy_Conversion_Factors-X00000000000000.fits
# # [INFO] [2024-11-30T23:53:21] System RV 0
# [COMMAND] [2024-11-30T23:53:21]
cp /lhome/jperea/ppsdev/pcms3/src/pipeline/etc/ecfgrid.fits.gz \
/scratch/226601.1.all.q/xmm/ppsprod/229747/intermediate/GlobalHK-all-1-Energy_Conversion_Factors_Grid-X00000000000000.fits
# # [INFO] [2024-11-30T23:53:21] System RV 0
# [COMMAND] [2024-11-30T23:53:21]
cp /lhome/jperea/ppsdev/pcms3/src/pipeline/etc/fluxgrid.fits.gz \
/scratch/226601.1.all.q/xmm/ppsprod/229747/intermediate/GlobalHK-all-1-Flux_Grid-X00000000000000.fits
# # [INFO] [2024-11-30T23:53:21] System RV 0
# # [INFO] [2024-11-30T23:53:21] Module name: ExpChooser
# # [INFO] [2024-11-30T23:53:21] Instrument: emos1
# # [INFO] [2024-11-30T23:53:21] Stream no.: 0001
# # [INFO] [2024-11-30T23:53:21] Module version number: 1.38
# # [INFO] [2024-11-30T23:53:21] Checking exposure S003 for processability
# # [INFO] [2024-11-30T23:53:21] Filter: CalClosed
# # [INFO] [2024-11-30T23:53:21] Instrument mode: PrimeFullWindow
# # [INFO] [2024-11-30T23:53:21] Exposure duration: 4671
# # [INFO] [2024-11-30T23:53:21] Exposure ignored due to invalid or unsupported filter
# # [INFO] [2024-11-30T23:53:21] Module name: ExpChooser
# # [INFO] [2024-11-30T23:53:21] Instrument: emos2
# # [INFO] [2024-11-30T23:53:21] Stream no.: 0001
# # [INFO] [2024-11-30T23:53:21] Module version number: 1.38
# # [INFO] [2024-11-30T23:53:21] Checking exposure S004 for processability
# # [INFO] [2024-11-30T23:53:21] Filter: CalClosed
# # [INFO] [2024-11-30T23:53:21] Instrument mode: PrimeFullWindow
# # [INFO] [2024-11-30T23:53:21] Exposure duration: 4682
# # [INFO] [2024-11-30T23:53:21] Exposure ignored due to invalid or unsupported filter
