Skip to content

Commit 8d6b9dd

Browse files
More PSD fixes.
1 parent cacf254 commit 8d6b9dd

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

minke/injection.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,14 +63,16 @@ def make_injection(
6363
injection = data + waveform.project(detector)
6464
injection.channel = channel_n
6565

66+
duration = injection.times[-1] - injection.times[0]
67+
6668
print("length of injection", len(injection.data))
67-
print("duration of injection", (injection.times[-1] - injection.times[0]))
69+
print("duration of injection", (duration))
6870

6971
if psdfile:
7072
# Write the PSD file to an ascii file
7173
filename = f"{detector.abbreviation}_{psdfile}.dat"
7274
psd_model.to_file(filename, upper_frequency=sample_rate/2,
73-
lower_frequency=0, df=1/sample_rate)
75+
lower_frequency=0, df=1./duration)
7476

7577

7678
if framefile:

0 commit comments

Comments
 (0)