You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use in my script the example suggested in fermipy page:
# Write the source model map (after performing the fit)
gta.write_model_map(model_name="model01")
# Generate the PS map
psmap = gta.psmap(ccmap='ccube_00.fits',mmap='mcube_model01_00.fits', make_plots=True, emin=100, emax=100000, nbinloge=15)
The result is this one:
2025-01-10 17:43:13 INFO GTBinnedAnalysis.write_model_map(): Generating model map for component 00.
Traceback (most recent call last):
File "/Users/isabellamereu/FAscript/scriptpy3/FAfup_3.3.8_py3.py", line 586, in
psmap = gta.psmap(ccmap='ccube_00.fits',mmap='mcube_model01_00.fits', make_plots=True, emin=100, emax=100000, nbinloge=15)
File "/Users/isabellamereu/opt/anaconda3/envs/fermipy/lib/python3.9/site-packages/fermipy/psmap.py", line 52, in psmap
config = schema.create_config(self.config['psmap'], **kwargs)
File "/Users/isabellamereu/opt/anaconda3/envs/fermipy/lib/python3.9/site-packages/fermipy/config.py", line 183, in create_config
validate_from_schema(config, self)
File "/Users/isabellamereu/opt/anaconda3/envs/fermipy/lib/python3.9/site-packages/fermipy/config.py", line 47, in validate_from_schema
raise KeyError('Invalid configuration key: %s' % k)
KeyError: 'Invalid configuration key: ccmap'
``
The text was updated successfully, but these errors were encountered:
Please use "cmap" instead of "ccmap" as the keyword argument for the PS map:
psmap = gta.psmap(cmap='ccube_00.fits',mmap='mcube_model01_00.fits', make_plots=True, emin=100, emax=100000, nbinloge=15)
This should resolve your issue. We will update the documentation to address this in due time.
I'd like to take advantage of this issue (which I also just found out) to propose to not just fix then name of this option, but to add also a proper docstring to the method which does not correspond to what shown in the documentation (try gta.psmap?).
Also, I noticed that in the output of this method there is a config key which does not show the whole configuration used by the method, but only the values specified when it was called. Storing the whole configuration with all available options and their real defaults is more important because the documentation might be outdated or wrong about the names of the arguments and their default values like in this case.
Data Analysis Question
How could I solve this problem with PS map tool?
I use in my script the example suggested in fermipy page:
The result is this one:
2025-01-10 17:43:13 INFO GTBinnedAnalysis.write_model_map(): Generating model map for component 00.
Traceback (most recent call last):
File "/Users/isabellamereu/FAscript/scriptpy3/FAfup_3.3.8_py3.py", line 586, in
psmap = gta.psmap(ccmap='ccube_00.fits',mmap='mcube_model01_00.fits', make_plots=True, emin=100, emax=100000, nbinloge=15)
File "/Users/isabellamereu/opt/anaconda3/envs/fermipy/lib/python3.9/site-packages/fermipy/psmap.py", line 52, in psmap
config = schema.create_config(self.config['psmap'], **kwargs)
File "/Users/isabellamereu/opt/anaconda3/envs/fermipy/lib/python3.9/site-packages/fermipy/config.py", line 183, in create_config
validate_from_schema(config, self)
File "/Users/isabellamereu/opt/anaconda3/envs/fermipy/lib/python3.9/site-packages/fermipy/config.py", line 47, in validate_from_schema
raise KeyError('Invalid configuration key: %s' % k)
KeyError: 'Invalid configuration key: ccmap'
``
The text was updated successfully, but these errors were encountered: