Skip to content

Issue in the gridding correction function? #14

Description

@lfrlucas

Hi,
While using your PSWF code for the Slow Transients Pipeline, I observed that the first element of the 1D gridding correction function (at position nu=-1) is different than the expected:
image
In this image it is about 0.0212, but I would expect a smaller value than next one of 0.007, as it tends to decrease for smaller indexes.
Apparently this can be fixed by changing the following lines of grdsf function:

    part[(nu > 0.75) & (nu < 1.0)] = 1
    nuend[(nu > 0.75) & (nu < 1.0)] = 1.0

to:

    part[(nu > 0.75) & (nu <= 1.0)] = 1
    nuend[(nu > 0.75) & (nu <= 1.0)] = 1.0

Do you agree this is an issue?
Thanks.

Activity

  1. timcornwell commented on Apr 26, 2018

    @timcornwell
    Contributor

    I agree it's an issue but I don't agree totally with your change.

    [grdsf.f.txt](https://github.com/SKA-ScienceDataProcessor/algorithm-reference-library/files/1951338/grdsf.f.txt)
    I've attached the Fortran file from which this python version was derived. Reading from that I think the lines should be:

    part[(nu >= 0.0) & (nu < 0.75)] = 0
    part[(nu >= 0.75) & (nu <= 1.0)] = 1
    nuend[(nu >= 0.0) & (nu <= 0.75)] = 0.75
    nuend[(nu > 0.75) & (nu <= 1.0)] = 1.0
    

    Can you check this line of derivation?

    How did this manifest itself? I'm impressed that you found it.

    Cheers,
    Tim

  2. timcornwell commented on Apr 26, 2018

    @timcornwell
    Contributor

    Scratch that. It should be:

    part[(nu >= 0.0) & (nu < 0.75)] = 0
    part[(nu >= 0.75) & (nu <= 1.0)] = 1
    nuend[(nu >= 0.0) & (nu < 0.75)] = 0.75
    nuend[(nu >= 0.75) & (nu <= 1.0)] = 1.0
    

    i.e. the selections must be the same for part and nun.

  3. lfrlucas commented on Apr 26, 2018

    @lfrlucas
    Author

    I'm working on W-Projection (implementation based on your paper) for the Slow Transients Pipeline (first on Python and then on C++ implementation).
    I found this issue while debugging W-projection implementation for the STP and inspecting the generated matrices. We had an idea to speedup W-projection implementation using Hankel transform. While it appeared to work using a Gaussian AA-kernel, we observed that for PSWF some artifacts arise close to the image borders. I found this issue while inspecting the correction gridding function values but this was not the cause for the artifacts. However, this issue may affect some image border samples when performing the gridding correction step. Thanks for your correction. I'm not aware of PSWF implementation details.

  4. timcornwell commented on Apr 26, 2018

    @timcornwell
    Contributor
  5. as595 commented on Apr 26, 2018

    @as595

    We're seeing if we can be quicker than reprojection :-)

  6. timcornwell commented on Apr 26, 2018

    @timcornwell
    Contributor
  7. as595 commented on Apr 26, 2018

    @as595

    Also - there are a variety of different integration lengths requested for the STP, so a w-correction of some sort may be required anyway.

  8. lfrlucas commented on Apr 26, 2018

    @lfrlucas
    Author

    Thanks Anna.
    Tim, I tested your correction. I observe that fixing nu=0.75 results in a quite small difference for the value in this position. But the selections are consistent now. Thanks.

  9. added a commit that references this issue on Apr 26, 2018
  10. added a commit that references this issue on Nov 28, 2018
  11. timcornwell commented on Feb 6, 2019

    @timcornwell
    Contributor

    Now complete.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions