Skip to content

Commit

Permalink
Merge pull request #55 from FRBs/snrdebug
Browse files Browse the repository at this point in the history
Added check to ensure that FRB SNRs are always above threshold
  • Loading branch information
JordanHoffmann3 authored Sep 27, 2024
2 parents 6cb23b2 + ed474a7 commit b97032f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion zdm/survey.py
Original file line number Diff line number Diff line change
Expand Up @@ -957,13 +957,18 @@ def process_survey_file(self,filename:str,
self.Ss=self.SNRs/self.SNRTHRESHs
self.TOBS=self.meta['TOBS']
self.NORM_FRB=self.meta['NORM_FRB']
self.Ss[np.where(self.Ss < 1.)[0]]=1

# sets the 'beam' values to unity by default
self.beam_b=np.array([1])
self.beam_o=np.array([1])
self.NBEAMS=1

# checks for incorrectSNR values
toolow = np.where(self.Ss < 1.)[0]
if len(toolow) > 0:
print("FRBs ",toolow," have SNR < SNRTHRESH!!! Please correct this. Exiting...")
exit()

print("FRB survey sucessfully initialised with ",self.NFRB," FRBs starting from", self.iFRB)

def process_dmg(self):
Expand Down

0 comments on commit b97032f

Please sign in to comment.