Open DevinW3 opened 6 months ago
Hmm. First of all, you do not send galaxies in one at a time ... that would take forever and isn't supported anyway.
But the first problem is somewhat cryptic. I'm wondering if you tried to run this and it left some stub files in the way? Can you make sure the output directory is empty before running? Otherwise I don't know what to suggest. If you could post a sample of the input galaxy file or what is in catalog_maker.py
.
Thanks for the tip, it was a combination of two things, one being the output folder not being empty. The other was that I was passing the input FITS file as an astropy table, when I fed GalaxyCatalogMaker the raw fits.data it worked.
However I've now run into an issue with the red-sequence calibration step (error below), which is making me think the galaxy catalog step didn't work as well as I thought. In the cal.yml file I've made sure the galfile path is to where the master_table.fit got created.
redmapper_calibrate.py -c cal_example.yml
INFO:redmapper-16:Selecting red galaxies from spectra...
Traceback (most recent call last):
File "PATH/bin/redmapper_calibrate.py", line 4, in
IndexError: index 0 is out of bounds for axis 0 with size 0
Hi there,
I'm having trouble getting my input galaxy catalog to work with redmapper.GalaxyCatalogMaker. I have made sure my input fits table has the required data types outlined in the first step of redMaPPer's HOW-TO. I tried appending the whole galaxy catalog in one line (first error below), and also tried appending one galaxy at a time in a for loop (2nd error below) like is done in the HOW-TO example. Any help you can provide is much appreciated.
Traceback (most recent call last): File "PATH/catalog_maker.py", line 46, in
maker.append_galaxies(galaxy_catalog)
File "PATH/lib/python3.11/site-packages/redmapper-0.8.5-py3.11-linux-x86_64.egg/redmapper/galaxy.py", line 768, in append_galaxies
raise RuntimeError("We think there are 0 galaxies in pixel %d, but the file exists." % (pix))
RuntimeError: We think there are 0 galaxies in pixel 5749, but the file exists.
Traceback (most recent call last): File "PATH/catalog_maker.py", line 46, in
maker.append_galaxies(galaxies[i])
File "PATH/lib/python3.11/site-packages/redmapper-0.8.5-py3.11-linux-x86_64.egg/redmapper/galaxy.py", line 731, in append_galaxies
self._check_galaxies(gals)
File "PATH/lib/python3.11/site-packages/redmapper-0.8.5-py3.11-linux-x86_64.egg/redmapper/galaxy.py", line 998, in _check_galaxies
if len(np.unique(gals['id'])) < len(gals['id']):
^^^^^^^^^^^^^^^
TypeError: object of type 'numpy.int64' has no len()