Add show_clean_params call to select_clean_data#78
Add show_clean_params call to select_clean_data#78DrSoulain merged 7 commits intoSAIL-Labs:masterfrom
show_clean_params call to select_clean_data#78Conversation
Codecov Report
@@ Coverage Diff @@
## master #78 +/- ##
===========================================
- Coverage 71.53% 48.19% -23.35%
===========================================
Files 25 19 -6
Lines 3833 3648 -185
===========================================
- Hits 2742 1758 -984
- Misses 1091 1890 +799
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
|
It's not your fault this function isn't yet tested, but maybe consider fixing that too while you're at it :) |
|
These are quite big functions with a lot of cleaning steps performed and they are all pretty new for me, so I'm not sure I would be able to write tests for it in the short term. However, it is definitely something I can look into in the near future, as I experiment more with the data cleaning procedure. Given that this change does not affect the calculations or the outputs of the function, would it be OK to defer adding tests for cleaning to a future PR ? |
|
So, If I understand correctly, you want to add a new keyword in select_clean_data() to check directly within the function instead of using another function show_clean_params(). In the near-future release, we added the CLI possibility to amical and included your suggestion. But for now, I think the best way to add what you propose is to run show_clean_params() at the beginning of select_clean_data() using a show_param argument and return None within (to stop the cleaning process at this step). You don't want to clean the data if your parameters are not well placed. |
|
The way I was seeing this change, it would not replace the ability to run
I think this addition can be useful for users who interact with the API directly (regardless of if the CLI does it) especially if they want to generate all possible plots when they clean the data. AMICAL is quite fast to run so I could see value in being able to generate the plots in a simple way, inspect them later, and re-run if needed (or just show them, stop the script with That being said, if the CLI update brings a similar API change. I suggest to make this a draft PR, wait for the CLI update, and see if these changes would still be relevant after the CLI is merged. Does that sound good @DrSoulain ? |
|
I converted this to a draft PR for now, I can rebase it if it is still useful after #76 is merged. |
Co-authored-by: Clément Robert <cr52@protonmail.com>
Co-authored-by: Clément Robert <cr52@protonmail.com>
|
I rebased this on the latest version and reorganized it a bit:
I think this add the functionality I was aiming to add at first, but with better backward compatibility and simpler defaults. I think it is ready for review now that #76 is merged. |
This closes #77, enabling users to use a single dictionary to specify parameters for the whole cleaning step, and integrating the plotting of cleaning parameters to the actual cleaning procedure. I also removed the
show_clean_paramscall in the SPHERE example to avoid duplicating plots.I also added the SPHERE data directory and the Saveoifits directory to
.gitignore, as I realized they were not there when I ran the examples. It's not directly link to the API change, but I wanted to avoid another PR just of this small change.