Skip to content

Update get_rfi_mask to work with Python 3.11#17

Open
antrikshdhand wants to merge 12 commits intocosmo-ethz:masterfrom
antrikshdhand:maintain-rfi-mask-3.11
Open

Update get_rfi_mask to work with Python 3.11#17
antrikshdhand wants to merge 12 commits intocosmo-ethz:masterfrom
antrikshdhand:maintain-rfi-mask-3.11

Conversation

@antrikshdhand
Copy link
Copy Markdown

This PR aims to allow developers to use the get_rfi_mask() function on Python 3.11. The rest of the code functionality is untouched. New developers should now be able to clone the repository, create a virtual environment, install the requirements listed in requirements-rfi.txt, and run example_rfi.py, which runs the SEEK SumThreshold algorithm on a spectrogram image.

This required a few changes to the code:

  • Updating syntax to comply with modern NumPy and SciPy standards
  • Removing the HOPE JIT compiler, as the project does not support Python >3.6
  • Fixing a bug with the integer indexing in the author's original Gaussian filter function

@antrikshdhand antrikshdhand marked this pull request as draft July 30, 2024 03:58
@antrikshdhand
Copy link
Copy Markdown
Author

antrikshdhand commented Jul 30, 2024

  • Fixed some matplotlib quirks to allow plots to appear sequentially
  • Added some guard clauses to get_rfi_mask to prevent the running of mask dilation if mask=None
  • Removed images from repository

@antrikshdhand antrikshdhand changed the title Allow get_rfi_mask to work with Python 3.11 Update get_rfi_mask to work with Python 3.11 Jul 31, 2024
@jakeret
Copy link
Copy Markdown
Collaborator

jakeret commented Aug 6, 2024

Hi Antriksh thanks for contributing. Do you want to merge this or is it still work in progress?

@antrikshdhand antrikshdhand marked this pull request as ready for review August 6, 2024 07:05
@antrikshdhand
Copy link
Copy Markdown
Author

antrikshdhand commented Aug 6, 2024

Hi Joel, no worries!

It should be good to merge. I haven't thoroughly tested the code, but I have only majorly changed the following files:

  • seek/mitigation/sum_threshold.py
  • seek/mitigation/sum_threshold_utils.py
    and added my own example file. The rest are syntax tweaks.

Thanks.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants