Skip to content
Snippets Groups Projects
Commit f53d844e authored by Aaron Viets's avatar Aaron Viets
Browse files

plot_ASD.py: distinguish between CLEAN data and regular data in the color scheme

parent 4b1779ee
No related branches found
No related tags found
No related merge requests found
......@@ -4,20 +4,20 @@
#################################
# which interferometer (H or L)
IFO = H
IFO = L
# determines where to look for filters files (e.g., O1, O2, O3, ER10, ER13, ER14, PreER10, PreER13, PreER14)
OBSRUN = O3
# Determines whether to find calibration filters in the old SVN or the git repo. Starting with PreER15 and O4, we switched to the git repo. Set to 'svn' or 'git'.
FILTERSRC = git
FILTERSRC = svn
START = $(shell echo 1266710418 | bc)
START = $(shell echo 1338076818 | bc)
# 1266605804 H1 BB inj
# 1237831461 start of O3A
# 1256655618 start of O3B
# 1238288418
# 1269090018
# 1269114645-21449
END = $(shell echo 1266750418 | bc)
END = $(shell echo 1338077818 | bc)
# 1266606486 H1 BB inj
# 1253977218 end of O3A
# 1269367218 end of O3B
......@@ -28,7 +28,7 @@ SHMRUNTIME = 600
PLOT_WARMUP_TIME = 256
PLOT_COOLDOWN_TIME = 256
GDSCONFIGS = gds-dcs-filter-generation/filters/PreER15/GDSFilters/H1GDS_test_1324762762.ini
GDSCONFIGS = Filters/O3/GDSFilters/L1GDS_1338760111_NotForProduction.ini
DCSCONFIGS = Filters/O3/GDSFilters/H1DCS_C01_1256655618_v2_test.ini
DCS_TDCF_UNCERTAINTY_CONFIGS = Filters/O3/GDSFilters/H1DCS_1256655618_v2_tdcf_unc.ini
SCALAR_CORR_CONFIGS = Filters/O3/GDSFilters/H1DCS_test_1256655618_v2_SCALAR_CORR.ini
......@@ -53,7 +53,7 @@ DCSTESTCONFIGS = Filters/O3/GDSFilters/H1DCS_C01_1252083618_AllCorrectionsTest.i
GDSSHMCONFIGS = Filters/O3/GDSFilters/H1GDS_1258216456_testing.ini
GDSOLDCONFIGS = Filters/ER14/GDSFilters/L1GDS_1235491416_old.ini
all: pcal_C00_transfer_functions
all: noise_subtraction_ASD_GDS
# TDCFs_pcal2darm_plots
# pcal_DCS_transfer_functions
#approxKappasErrorPlot
......@@ -319,10 +319,10 @@ noise_subtraction_ASD_DCS_LINES: $(IFO)1_hoft_DCS_frames.cache
./ASD_plots --ifo $(IFO)1 --gps-start-time $(PLOT_START) --gps-end-time $(PLOT_END) --frame-cache-list '$(IFO)1_hoft_DCS_frames.cache,$(IFO)1_hoft_DCS_frames.cache' --channel-list 'DCS-CALIB_STRAIN,DCS-CALIB_STRAIN_CLEAN' --ASD-fmin 0.3
noise_subtraction_ASD_GDS: $(IFO)1_hoft_GDS_frames.cache
./ASD_plots --ifo $(IFO)1 --gps-start-time $(PLOT_START) --gps-end-time $(PLOT_END) --frame-cache-list $(IFO)1_hoft_GDS_frames.cache,$(IFO)1_hoft_GDS_frames.cache --channel-list GDS-CALIB_STRAIN,GDS-CALIB_STRAIN_CLEAN --ASD-fmin 0.5 --ASD-labels 'GDS-CALIB_STRAIN,GDS-CALIB_STRAIN_CLEAN'
python3 plot_ASD.py --gps-start-time $(PLOT_START) --gps-end-time $(PLOT_END) --ifo $(IFO)1 --frame-cache-list $(IFO)1_hoft_GDS_frames.cache,$(IFO)1_hoft_GDS_frames.cache --channel-list GDS-CALIB_STRAIN,GDS-CALIB_STRAIN_CLEAN --sample-rate 16384 --fft-time 1 --fft-spacing 0.5 --freq-res 0.25 --frequency-max=8192 --labels 'GDS-CALIB_STRAIN,GDS-CALIB_STRAIN_CLEAN'
noise_subtraction_ASD_C00: $(IFO)1_C00_frames.cache
./ASD_plots --ifo $(IFO)1 --gps-start-time $(PLOT_START) --gps-end-time $(PLOT_END) --frame-cache-list '$(IFO)1_C00_frames.cache,$(IFO)1_C00_frames.cache' --channel-list 'GDS-CALIB_STRAIN,GDS-CALIB_STRAIN_CLEAN'
python3 plot_ASD.py --gps-start-time $(PLOT_START) --gps-end-time $(PLOT_END) --ifo $(IFO)1 --frame-cache-list $(IFO)1_C00_frames.cache,$(IFO)1_C00_frames.cache --channel-list GDS-CALIB_STRAIN,GDS-CALIB_STRAIN_CLEAN --sample-rate 16384 --fft-time 1 --fft-spacing 0.5 --freq-res 0.25 --frequency-max=8192 --labels 'GDS-CALIB_STRAIN,GDS-CALIB_STRAIN_CLEAN'
highpass_filter_ASD_GDS: $(IFO)1_C00_frames.cache $(IFO)1_lowLatency_GDS_frames.cache $(IFO)1_lowLatency_asymmetric_GDS_frames.cache
./ASD_plots --ifo $(IFO)1 --gps-start-time $(PLOT_START) --gps-end-time $(PLOT_END) --frame-cache-list '$(IFO)1_C00_frames.cache,$(IFO)1_lowLatency_GDS_frames.cache,$(IFO)1_lowLatency_asymmetric_GDS_frames.cache' --channel-list 'GDS-CALIB_STRAIN,GDS-CALIB_STRAIN,GDS-CALIB_STRAIN' --ASD-fmin 0.5 --ASD-labels 'C00,0.95s Latency Symmetric Filters,0.95s Latency Asymmetric Filters'
......
......@@ -322,8 +322,8 @@ if not any(channel_list):
channel_list.append("CAL-CS_TDEP_F_S_OUTPUT")
channel_list.append("CAL-CS_TDEP_Q_S_OUTPUT")
channel_list.append("GRD-IFO_OK")
#channel_list.append("ISC_LOCK_STATE_N")
#channel_list.append("ISC_LOCK_STATUS")
channel_list.append("GRD-ISC_LOCK_STATE_N")
channel_list.append("GRD-ISC_LOCK_STATUS")
channel_list.append("GRD-ISC_LOCK_OK")
channel_list.append("GRD-ISC_LOCK_ERROR")
channel_list.append("GRD-IFO_INTENT")
......
......@@ -210,13 +210,23 @@ C02_labels = ['C02', 'c02']
C01_labels = ['C01', 'c01', 'DCS', 'dcs', 'high-latency', 'High-Latency', 'High-latency', 'HIGH-LATENCY', 'high_latency', 'High_Latency', 'High_latency', 'HIGH_LATENCY', 'high latency', 'High Latency', 'High latency', 'HIGH LATENCY', 'offline', 'Offline', 'OFFLINE']
C00_labels = ['C00', 'c00', 'GDS', 'gds', 'low-latency', 'Low-Latency', 'Low-latency', 'LOW-LATENCY', 'low_latency', 'Low_Latency', 'Low_latency', 'LOW_LATENCY', 'low latency', 'Low Latency', 'Low latency', 'LOW LATENCY', 'online', 'Online', 'ONLINE']
CALCS_labels = ['CALCS', 'calcs', 'Calcs', 'CalCS', 'CAL-CS', 'Cal-CS', 'cal-cs', 'CAL_CS', 'Cal_CS', 'cal_cs', 'front', 'FRONT', 'Front']
clean_labels = ['CLEAN', 'Clean', 'clean', 'NoiseSub', 'NOISESUB', 'noisesub', 'NOISE_SUB', 'noise_sub']
for i in range(len(labels)):
if any ([x for x in C02_labels if x in labels[i]]):
colors.append('springgreen')
if any ([x for x in clean_labels if x in labels[i]]):
colors.append('darkgreen')
else:
colors.append('springgreen')
elif any ([x for x in C01_labels if x in labels[i]]):
colors.append('maroon')
if any ([x for x in clean_labels if x in labels[i]]):
colors.append('lightcoral')
else:
colors.append('maroon')
elif any ([x for x in C00_labels if x in labels[i]]):
colors.append('royalblue')
if any ([x for x in clean_labels if x in labels[i]]):
colors.append('navy')
else:
colors.append('royalblue')
elif any([x for x in CALCS_labels if x in labels[i]]):
colors.append('silver')
else:
......@@ -227,7 +237,7 @@ freq_scale = 'log' if options.frequency_min > 0.0 and options.frequency_max / op
ASD_scale = 'log' if options.ASD_min > 0.0 and options.ASD_max / options.ASD_min > 10 else 'linear'
plt.figure(figsize = (10, 6))
for i in range(0, len(labels)):
plt.plot(fvec[:len(ASDs[i])], ASDs[i], colors[i % 6], linewidth = 0.75) #, label = r'$%s$' % labels[i])
plt.plot(fvec[:len(ASDs[i])], ASDs[i], colors[i % 7], linewidth = 0.75) #, label = r'$%s$' % labels[i])
if i == 0:
patches = [mpatches.Patch(color = colors[j], label = r'$%s$' % labels[j]) for j in range(len(labels))]
plt.legend(handles = patches, loc = 'upper right', ncol = 1)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment