cristobal-sifon / profiley

Profile calculations for galaxies and clusters
MIT License
5 stars 2 forks source link

nfw rdelta with same overdensity #34

Closed cristobal-sifon closed 11 months ago

cristobal-sifon commented 1 year ago

When calculating rdelta passing the same overdensity from the definition, this happens:

Traceback (most recent call last):
  File "/home/cristobal/Documents/chances/cluster-catalogues/codex_masses_manual.py", line 39, in <module>
    main()
  File "/home/cristobal/Documents/chances/cluster-catalogues/codex_masses_manual.py", line 31, in main
    r200 = nfw.rdelta(200)
  File "/home/cristobal/anaconda3/envs/astroquery/lib/python3.10/site-packages/profiley/nfw.py", line 185, in rdelta
    mdelta, cdelta = self.mdelta(overdensity, background, **kwargs)
ValueError: not enough values to unpack (expected 2, got 1)

because of the following:

if overdensity == self.overdensity \
        and background == self.background:
    return self.mass
cristobal-sifon commented 11 months ago

solved by 6140b31