icecube / skyllh

https://icecube.github.io/skyllh/
GNU General Public License v3.0
11 stars 5 forks source link

Add grid definition when fixed parameters #208

Closed elenamanao closed 6 months ago

elenamanao commented 6 months ago

Added new grid definition in the Parameters class for the case in which the gamma parameter is fixed

martwo commented 6 months ago

You need to create the ParameterGrid instance yourself and return that. You cannot just set the grid variable, which will be overwritten again later. Also don't use the print statement. If you want to print out a info message, then you need to use a logger

martwo commented 6 months ago

OK now the unit tests fails, because it actually tests for the ValueError that is not there anymore. So you need to remove that unittest. But it would be great to add a unit test for this case of fixed parameters.

martwo commented 6 months ago

The unit test is here: https://github.com/icecube/skyllh/blob/738c49fcca6c31d6d2cbf1b72bbfd0449f070ecc/tests/core/test_parameters.py#L139

martwo commented 6 months ago

Great! Now the print statement still needs to go ;)