Open Fergus-Hayes opened 6 years ago
@Fergus-Hayes Huh... can you verify if this happens if neither of the output files actually exist, or does it just happen in an empty directory otherwise?
This will happen in an empty directory yeah
Saving to .txt files works, by the way.
@titodalcanton @Fergus-Hayes I think I know what the issue is. Given the options, there are actually multiple PSDs being generated which cover slightly different times. The save command is getting called for each, I think. This is a bug we'll need to fix....
The reason it doesn't fail for the .txt output, is that it's just overwriting the file and you'll end up with whatever the last PSD was.
Some proposals for a fix:
.npy
and .txt
files the PSDs could use different columns. It might not be straightforward to read those FrequencySeries back with PyCBC's primitives though.--psd-output median psd.txt
.--psd-output 1214672180 psd.txt
.In principle options 1-3 could all be supported by turning the existing argument into --psd-output <action> <file>
, where <action>
could be all
, mean
/median
, or a GPS time.
Confirming that this error persists. I think that implementing the "all" option should be the first thing to do to prevent failure. Allowing selection of which PSD gets saved is an enhancement which can come after
Calling the command:
brings up the error:
while removing the --psd-output option to .hdf will produce the snr time series fine.