Closed huanian closed 1 year ago
Hi @huanian, I can't seem to reproduce this error using your data files. However, I had to guess at some of the settings you were using, like the binning. I've included the script I used to test the cross-correlation at the bottom of the message; does it work for you? If you're able to share the exact script you used (including loading the data files), I can try it out.
However, there might be a different issue. When I check the range of the dec in these files, I get different max values than you (same min values). Here's what I ran, and the output:
from astropy.table import Table
import numpy as np
d1 = Table.read('data1.csv')
d2 = Table.read('data2.csv')
print(np.min(d1['DEC']), np.max(d1['DEC']))
print(np.min(d2['dec']), np.max(d2['dec']))
-11.113624 42.055342
-11.344418906942977 33.80917013193319
Do you know why we might get different max values?
And here's the full test of the cross-correlation:
@huanian What happens if you read the data from the data files and then re-run your script? If the error disappears, then my guess is that the in-memory representation is different from the native representation and the error can be removed by changing the datatype of the objects.
@huanian Was your problem resolved?
@huanian Closing this issue - please feel free to reopen if you still need assistance.
These days I was trying to do an angular correlation. However, I encountered some error which looks very strange. It said the dec range out of 180. See the error below:
Error in file: countpairs_theta_mocks_impl_double.c func: check_ra_dec_double line: 63 with expression `theta[i] <= 180.0'
Declination should not be more than 180. Did you swap ra and dec?Hopefully, input validation. Otherwise, bug in code: please file an issue on GitHub: https://github.com/manodeep/Corrfunc/issues
Traceback (most recent call last):
File "/data/fantasyzhn/Nearby_Satellite/./corr_ang.py", line 63, in
File "/home/fantasyzhn/anaconda3/lib/python3.9/site-packages/Corrfunc/mocks/DDtheta_mocks.py", line 333, in DDtheta_mocks
RuntimeError: RuntimeError occurred
However, I checked the range of the two decs, the ranges are all good and the results are the following:
print (np.min(dec),np.max(dec),np.min(dec_sat),np.max(dec_sat))
-11.113624 68.957155 -11.344418906942977 69.2043661023686
Below attached are two data files, one for (ra1, dec1), another one is (ra2, dec2) data1.csv data2.csv