Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 1 addition & 1 deletion gal_catalog_config.ini
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ CREDZONE = 0.5
NSIGMAS_IN_D = 3
COMPLETENESSP = 0.5
MINGALAXIES = 100
NGALAXIES = 10000
NGALAXIES = 1000
MINL = 1e40 ; expected min luminosity of event in r-band
MAXL = 1e42 ; expected max luminosity of event in r-band
SENSITIVITY = 22 ; LCO limiting magnitude in r-band
Expand Down
12 changes: 6 additions & 6 deletions src/gwtm_cron/gwtm_listener/find_galaxies.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def generate_galaxy_list(eventlocalization: EventLocalization, galaxy_config_pat
minL = float(galaxy_config.get('GALAXIES', 'MINL')) # Estimated brightest KN luminosity
maxL = float(galaxy_config.get('GALAXIES', 'MAXL')) # Estimated faintest KN luminosity
sensitivity = float(galaxy_config.get('GALAXIES', 'SENSITIVITY')) # Estimatest faintest app mag we can see
#ngalaxtoshow = int(galaxy_config.get('GALAXIES', 'NGALAXIES')) # Number of galaxies to show
ngalaxtoshow = int(galaxy_config.get('GALAXIES', 'NGALAXIES')) # Number of galaxies to show

mindistFactor = float(galaxy_config.get('GALAXIES', 'MINDISTFACTOR')) #reflecting a small chance that the theory is comletely wrong and we can still see something

Expand Down Expand Up @@ -178,10 +178,10 @@ def generate_galaxy_list(eventlocalization: EventLocalization, galaxy_config_pat

#if want to limit by number of galaxies in .ini file

# if len(ii) > ngalaxtoshow:
# n = ngalaxtoshow
# else:
# n = len(ii)
if len(ii) > ngalaxtoshow:
n = ngalaxtoshow
else:
n = len(ii)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's name n something more meaningful.

Also can you name ii something more meaningful as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright, updated in most recent commit!


score=(p * massNorm / normalization)
ra=galaxies['ra']
Expand All @@ -194,7 +194,7 @@ def generate_galaxy_list(eventlocalization: EventLocalization, galaxy_config_pat

iter = ii.tolist()
galaxy_list = []
for i in range(len(iter)):
for i in range(n):
ind = iter[i]
galaxy_list.append({
"ra":ra[ind],
Expand Down