data_generation.py breaks if psd-dict is only partially filled
Bilby_pipe (specifically data_generation.py) breaks if psd-dict contains only some of the entries (e.g. you set up 3 detectors but pass only 2 psd files, wanting 3rd to be generated from data).
When run with partially filled prior-dict, the error occurs in line 321
318 @property
319 def psd_start_time(self):
320 """ The PSD start time relative to segment start time """
321 if self._psd_start_time is not None:
322 return self._psd_start_time
323 elif self.trigger_time is not None:
324 psd_start_time = -self.psd_duration
325 logger.info(
326 f"Using default PSD start time {psd_start_time} relative to start time"
327 )
328 return psd_start_time
329 else:
330 raise BilbyPipeError("PSD start time not set")
There is no attribute _psd_start_time
This is because when prior-dict is not None, then in line 153
150 if self.psd_dict is None:
151 self.psd_length = args.psd_length
152 self.psd_fractional_overlap = args.psd_fractional_overlap
153 self.psd_start_time = args.psd_start_time
154 self.psd_method = args.psd_method
self.psd_start time is never set, so the program breaks.
Edited by Tomasz Baka