Makefile.all_tests 4.23 KB
Newer Older
Madeline Wade's avatar
Madeline Wade committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104
# This makefile can be used to run all of the tests instead of running them one by one.

# Indicate IFO and observing run
# Note: Make sure that there is no space after the L or H! 
# Another note: Livingston cluster cannot run this for IFO = H. Make sure that the cluster you're using has the raw frames you want. 
export IFO=L
# OBSRUN inidcates where to look for filters files (e.g. O1, O2, O3, ER10, ER13, ER14, PreER13, PreER14)
#export OBSRUN=O2
export OBSRUN=O3

# Set start and stop times for a short lock stretch
export SHORT_START=1238371988
export SHORT_END=1238376812
# Set start and stop times for a longer stretch that spans a lock-unlock stretch
export LONG_START = 1228350334
export LONG_END = 1228352985
export SHMRUNTIME=400

# How much time does the calibraiton need to settle at the start and end?
PLOT_WARMUP_TIME = 1024
PLOT_COOLDOWN_TIME = 1024
export SHORT_PLOT_START=$(shell echo $(SHORT_START) + $(PLOT_WARMUP_TIME) | bc)
export LONG_PLOT_START=$(shell echo $(LONG_START) + $(PLOT_WARMUP_TIME) | bc)
export SHORT_PLOT_END=$(shell echo $(SHORT_END) - $(PLOT_COOLDOWN_TIME) | bc) 
export LONG_PLOT_END=$(shell echo $(LONG_END) - $(PLOT_COOLDOWN_TIME) | bc) 

# Point to all of the .ini files for different configurations
#export GDSCONFIGS=H1GDS_1232821094_gstlal-calibration-1-2-7.ini
export DCSCONFIGS=test.ini 
export DCSCONFIGSNOKAPPAS=test_nokappas.ini 

# Needed for writing pipeline graphs
export GST_DEBUG_DUMP_DOT_DIR=.

all: ASD_comparison statevector timeserieskappas response_function

# Create frame cache files for raw, C00, C01, and C02 frames
$(IFO)1_raw_frames.cache:
	gw_data_find -o $(IFO) -t $(IFO)1_R -s $(SHORT_START) -e $(SHORT_END) -l --url-type file > $@

$(IFO)1_C00_frames.cache:
	gw_data_find -o $(IFO) -t $(IFO)1_HOFT_C00 -s $(SHORT_START) -e $(SHORT_END) -l --url-type file > $@

$(IFO)1_C01_frames.cache:
	gw_data_find -o $(IFO) -t $(IFO)1_HOFT_C01 -s $(SHORT_START) -e $(SHORT_END) -l --url-type file > $@

$(IFO)1_C02_frames.cache:
	gw_data_find -o $(IFO) -t $(IFO)1_HOFT_C02 -s $(SHORT_START) -e $(SHORT_END) -l --url-type file > $@


# Calibrate DCS testing data
$(IFO)1_hoft_DCS_frames.cache: $(IFO)1_raw_frames.cache filters framesdir
	gstlal_compute_strain --gps-start-time $(SHORT_START) --gps-end-time $(SHORT_END) --frame-cache $(IFO)1_raw_frames.cache --output-path Frames/$(OBSRUN)/$(IFO)1/DCS/ --frame-duration=64 --frames-per-file=64 --wings=364 --config-file $(DCSCONFIGS)
	ls Frames/$(OBSRUN)/$(IFO)1/DCS/$(IFO)-$(IFO)1DCS_TEST-*.gwf | lalapps_path2cache > $@

# Calibrate DCS testing data with no kappas applied for response function test
$(IFO)1_hoft_DCS_no_kappas_frames.cache: $(IFO)1_raw_frames.cache filters framesdir
	gstlal_compute_strain --gps-start-time $(SHORT_START) --gps-end-time $(SHORT_END) --frame-cache $(IFO)1_raw_frames.cache --output-path Frames/$(OBSRUN)/$(IFO)1/DCS/ --frame-duration=64 --frames-per-file=64 --wings=364 --config-file $(DCSCONFIGSNOKAPPAS)
	ls Frames/$(OBSRUN)/$(IFO)1/DCS/$(IFO)-$(IFO)1DCS_TEST_NOKAPPAS*.gwf | lalapps_path2cache > $@


filters:
	if [ -d Filters/$(OBSRUN)/GDSFilters ]; then \
                svn up Filters/$(OBSRUN)/GDSFilters; \
        else \
                mkdir -p Filters/$(OBSRUN); \
                cd Filters/$(OBSRUN); \
                svn co https://svn.ligo.caltech.edu/svn/aligocalibration/trunk/Runs/$(OBSRUN)/GDSFilters; \
        fi

framesdir:
	mkdir -p Frames/$(OBSRUN)/$(IFO)1/easy_raw
	mkdir -p Frames/$(OBSRUN)/$(IFO)1/GDS
	mkdir -p Frames/$(OBSRUN)/$(IFO)1/DCS


response_function: $(IFO)1_hoft_DCS_no_kappas_frames.cache $(IFO)1_raw_frames.cache
	make -f Makefile.response_function

ASD_comparison: $(IFO)1_raw_frames.cache $(IFO)1_hoft_DCS_frames.cache $(IFO)1_C00_frames.cache
	make -f Makefile.ASD_comparison

statevector: $(IFO)1_hoft_DCS_frames.cache
	make -f Makefile.statevector

timeserieskappas:  $(IFO)1_hoft_DCS_frames.cache $(IFO)1_C00_frames.cache
	make -f Makefile.timeserieskappas

pcal_to_darm: $(IFO)1_raw_frames.cache $(IFO)1_hoft_DCS_frames.cache
	make -f Makefile.pcal_to_darm

# FIXME: This is seg faulting for me right now
calib_version_comparison: $(IFO)1_hoft_DCS_frames.cache $(IFO)1_C02_frames.cache
	make -f Makefile.calib_version_comparison

# Need to clean up this clean command
clean: 
	rm -rf Frames/
	rm -rf Filters/
	rm *.p*
	rm *.dot
	rm *.txt