Bug in calculation of SNR map

Issue #31 resolved
Jonas Kemmer created an issue

Hey,

I would like to report a bug in calculation of the SNR map.

 "../pyklip/kpp/stat/stat.py", line 337, in calculate
    for k in range(self.nl):

AttributeError: 'Stat' object has no attribute 'nl'

As far as I can see there is no similar attribute of Stat, which could replace nl. I have fixed the issue by replacing it with "self.image.shape[0]" instead.

Kind regards, Jonas

Comments (4)

  1. Jean-Baptiste Ruffio

    Hi Jonas,

    I apologize for the bug and the late reply. The reason this bug was not caught is because we stopped using the objects architecture of KPOP some time ago. It was originally conceived for GPIES (hoping it would generalize well...) but as we reduced data from more and more instruments, we quickly realized that the architecture was not flexible/general enough. We therefore decided to slowly deprecate all the classes. I kept the old code around, just in case, but I should have communicated the changes on the repository, which I did not.

    As of today, I definitely deleted all the classes to avoid confusion. It sounds like you found a work-around and if the code is working for you, you can keep using that version but it won't work if you pull the new commits. Most of the features are still available as stand-alone functions but you now need to read a write the files manually.

    The examples have been updated in the documentation (the kpop ipython notebook and a script to calculate a contrast curve with FMMF using the stand alone functions). I am happy to answer any of your questions and help you with the transition if you need!

    Cheers JB

  2. Jason Wang

    Hopefully JB's answer is satisfactory. I'm going to close this issue if it's been addressed. If not, feel free to reopen this issue or post a new one. Thanks!

  3. Log in to comment