manodeep / Corrfunc

⚡️⚡️⚡️Blazing fast correlation functions on the CPU.
https://corrfunc.readthedocs.io
MIT License
163 stars 50 forks source link

Xi from LRGs.dat #300

Closed schwartzw closed 2 months ago

schwartzw commented 11 months ago

Hi All,

I am trying to generate a xi function using the LRGs.dat file produced by the AbacusHOD module. How I am defining my coordinates are as follows:

X, Y, Z = read_ascii_catalog(filename) 

When I run the cell I get an error saying:

Error tokenizing data. C error: Expected 3 fields in line 4, saw 6

I tried looking through the documentation for help but haven't found anything. Is my approach incorrect or am I using the wrong file to generate xi? If someone could help me with this issue and point me in the right direction, it'd be greatly appreciated. Thanks

-Weston

lgarrison commented 11 months ago

I would just use astropy.io to read the file; Corrfunc's read_ascii_catalog() probably expects a particular format. There's an example of using astropy.io here: https://abacusutils.readthedocs.io/en/latest/tutorials/light_cones/lc_hod.html#hod-on-halo-light-cone-catalogs

(I realize you're probably not using halo light cones but the file format should be the same)

manodeep commented 11 months ago

@schwartzw Did you need any further help on this?

manodeep commented 2 months ago

@schwartzw I am closing this issue. Please feel free to re-open if you still need help