Skip to content

NameError: name 'self' is not defined

I have installed the gwsim according to the instructions on the repo page. However, when I try to run the GW_injections commands

GW_injections \ --file Universe.p \ --luminosity_weight 1 \ --redshift_weight 1 \ --population_model powerlaw-gaussian \ --alpha 3.4 \ --mu 35 \ --sigma 3.88 \ --Lambda 0.04 \ --delta_m 4.8 \ --beta 0.8 \ --snr 10 \ --output my_GW_injections \ --Madau_alpha 2.7 \ --Madau_beta 2.9 \ --Madau_zp 1.9 \ --T_obs 3 \ --R0 20 \ --seed 294757 \ --npools 8

it shows the following error:

Traceback (most recent call last): File "/home/lalit.pathak/.conda/envs/gwsim/bin/GW_injections", line 7, in <module> from GWSim.injections.masses import Masses File "/home/lalit.pathak/.conda/envs/gwsim/lib/python3.11/site-packages/GWSim/__init__.py", line 2, in <module> from .catalog import create_catalog, real_catalog File "/home/lalit.pathak/.conda/envs/gwsim/lib/python3.11/site-packages/GWSim/catalog/__init__.py", line 4, in <module> from . import handle_catalogs File "/home/lalit.pathak/.conda/envs/gwsim/lib/python3.11/site-packages/GWSim/catalog/handle_catalogs.py", line 7, in <module> class Catalog_MiceCat(object): File "/home/lalit.pathak/.conda/envs/gwsim/lib/python3.11/site-packages/GWSim/catalog/handle_catalogs.py", line 13, in Catalog_MiceCat self.flist = glob.glob(self.path_file) ^^^^ NameError: name 'self' is not defined

Do you have any idea why this might be happening?