Bug #3261

Issues with the correction in the devel version of Cssrcdetect (related to the bug fix in https://github.com/ctools/ctools/commit/d086ddbbe4c5e23409611d455c7a6c340b06d369)

Added by Adelfio Andrea over 4 years ago. Updated over 4 years ago.

Status:ClosedStart date:07/03/2020
Priority:NormalDue date:
Assigned To:Knödlseder Jürgen% Done:

100%

Category:-
Target version:1.7.0
Duration:

Description

I’m reporting a problem in the correction added in the script cssrcdetect.py after the smoothing of the skymap: all values of std and mean < 1 are set to zero. This may delete some information of the signal, resulting in a source position not correct. Also, cssrcdetect finds many sources around that position.
Setting some values to 0.0 after the smoothing could seriously modify the smoothing operation if there are multiple sources.

Can you check if I am doing something wrong? Attached, you can find a basic example you can check, for which cssrcdetect does not work properly with that correction.

A suggestion: instead of setting to zero negative values, you can search the minimum in std and mean and, if the minimum is negative, you add the absolute value of the minimum to all pixels. This should not change the result of the smoothing operation.

test_data.tar - Contains fits of the simulation and the skymap (2.31 MB) Adelfio Andrea, 07/03/2020 05:54 PM


Recurrence

No recurrence.

History

#1 Updated by Knödlseder Jürgen over 4 years ago

  • Target version set to 1.7.0

#2 Updated by Knödlseder Jürgen over 4 years ago

  • Status changed from New to Pull request
  • Assigned To set to Knödlseder Jürgen
  • % Done changed from 0 to 100

I implemented your suggestion and it seems to work fine. Here the corresponding code:

        # Compute minimum value of standard deviation
        std_offset  = 0.0
        for index in range(std.npix()):
            if std[index] < std_offset:
                std_offset = std[index]

        # If minimum value is negative then subtract minimum value to guarantee
        # a non-negative map of standard deviations
        if std_offset < 0.0:
            for index in range(std.npix()):
                std[index]  -= std_offset

#3 Updated by Knödlseder Jürgen over 4 years ago

  • Status changed from Pull request to Closed

Merged into devel.

Also available in: Atom PDF