Closed parkma99 closed 1 year ago
I try fix this by changing L59 to
mask = np.where(df["distmpc"] >= 0)
return df.iloc[mask]
But I got another error:
Found voevent S230609u-5-Update.xml
Latest skymap URL: https://gracedb.ligo.org/api/superevents/S230609u/files/Bilby.multiorder.fits,0
File /home/ma/Data/gwemopt/skymaps/S230609u_5_Bilby.multiorder.fits,0 already exists. Using this.
natural_nside = 256
nside = 256
Output directory: /home/ma/Data/gwemopt/S230609u_5_Bilby.multiorder/ATLAS
Loading skymap...
Generating catalog...
Loading from saved catalog: /home/ma/Data/gwemopt/catalogs/mangrove.hdf5
Traceback (most recent call last):
File "/home/ma/miniconda3/envs/gwemopt/lib/python3.11/site-packages/pandas/core/indexes/base.py", line 3652, in get_loc
return self._engine.get_loc(casted_key)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "pandas/_libs/index.pyx", line 147, in pandas._libs.index.IndexEngine.get_loc
File "pandas/_libs/index.pyx", line 176, in pandas._libs.index.IndexEngine.get_loc
File "pandas/_libs/hashtable_class_helper.pxi", line 7080, in pandas._libs.hashtable.PyObjectHashTable.get_item
File "pandas/_libs/hashtable_class_helper.pxi", line 7088, in pandas._libs.hashtable.PyObjectHashTable.get_item
KeyError: 'r'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "/home/ma/code/gwemopt/gwemopt/__main__.py", line 55, in <module>
run(sys.argv[1:])
File "/home/ma/code/gwemopt/gwemopt/run.py", line 59, in run
map_struct, catalog_struct = get_catalog(params, map_struct)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/ma/code/gwemopt/gwemopt/catalogs/get.py", line 69, in get_catalog
mask = np.zeros(len(cat_df["r"]))
~~~~~~^^^^^
File "/home/ma/miniconda3/envs/gwemopt/lib/python3.11/site-packages/pandas/core/frame.py", line 3761, in __getitem__
indexer = self.columns.get_loc(key)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/ma/miniconda3/envs/gwemopt/lib/python3.11/site-packages/pandas/core/indexes/base.py", line 3654, in get_loc
raise KeyError(key) from err
KeyError: 'r'
@parkma99 Thanks for reporting, see PR here: https://github.com/skyportal/gwemopt/pull/146. I will get this fixed.
@mcoughlin Thank you 😊
By the way, How to get the clu
catalog?
@parkma99 CLU is private, the new NED catalog should be sufficient.
@parkma99 CLU is private, the new NED catalog should be sufficient.
@mcoughlin Thanks
When I run command
python -m gwemopt --event S230609u --catalog mangrove
, I got error, message is below