Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added check to ensure that FRB SNRs are always above threshold #55

Merged
merged 1 commit into from
Sep 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading