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

RuntimeWarning: invalid value encountered in divide #5

Open
Cossa98 opened this issue Mar 29, 2024 · 0 comments
Open

RuntimeWarning: invalid value encountered in divide #5

Cossa98 opened this issue Mar 29, 2024 · 0 comments

Comments

@Cossa98
Copy link

Cossa98 commented Mar 29, 2024

Hi,

I am trying to apply the LR method to crossmatch two catalogues within a given radius

If I follow these steps:

xm = Match(MeerKATcat, DECaLScat)
match_results_lr = xm.run(method='lr', radius=4.0*u.arcsec)

all_matches = xm.get_matchs()
print(all_matches)

I get:

/home/cossa/astromatch/astromatch/lr.py:456: RuntimeWarning: invalid value encountered in divide lr_table['REL_' + magcol] / lr_table['p_any_' + magcol] /home/cossa/astromatch/astromatch/lr.py:555: RuntimeWarning: invalid value encountered in divide mask_ratio = match['prob_this_match']/pi_max > prob_ratio_secondary /home/cossa/astromatch/astromatch/match.py:293: FutureWarning: elementwise comparison failed; returning scalar instead, but in the future will perform elementwise comparison mask = np.char.strip(match[idcol]) == b'0.0'

I've tried to edit the lr.py code to address the issue but I don't know why division by zero or NaN values is occurring.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant