New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RMS quality control check for Non-LOFAR images #512
Comments
I've just uploaded my standalone script which conducts this test here: https://github.com/transientskp/scripts/tree/master/TraP_fits_QC |
The script contains an error on line 38 and it does not run. |
what do you mean with 'use identical value to that in TraP settings' for |
Will look at error when I find a moment later, the version I use on Struis works fine. In the TraP job_params.cfg when I wrote this code there was a parameter just known as "f". Fairly recently you or Tim improved the cfg file and "f" was renamed as "rms_est_fraction". |
When the option on the command line is set to F (my usual setting) it runs completely fine so the main functionality of the script (i.e. how it produces / fits / filters) that is required for this issue are there. The thing that is broken is the loop that repeats the fitting / filtering separately on individual frequency bands - important for this issue but maybe you have a more optimal method for this anyway. I can only work on this for a short time longer today, but will attempt to fix the = T setting and upload it to github before I leave. |
Ok... Fully working version uploaded. It was actually a really simple fix, this line https://github.com/transientskp/scripts/blob/master/TraP_fits_QC/TraP_fits_QC.py#L38 was just meant to be a duplicate of this line https://github.com/transientskp/scripts/blob/master/TraP_fits_QC/TraP_fits_QC.py#L48 |
Ok, so for educational purposes I post this here. It took me a while to figure out what was required or not but I think in the end everything can reduced to a couple of lines. Basically you can use
|
I've added the code that does a RMS check per image based on RMS for the full dataset: https://github.com/transientskp/tkp/pull/518/files#diff-9a872d7b6b3ffd498e95b8ec585d9166R83 Question now is, how do we integrate this properly? We just rewrote the internal main logic of TraP to support streaming data, and process data in steps per timestep. This is in conflict with this feature request I realize now. To solve this we could make a different main flow for batch processing and stream processing, where in the case of batch processing first all images are inserted in the database, then a quality check is ran and then the rest of TraP follows. I'm not really sure if that is the smart way to go, since I'm afraid the two flows will diverge too much and decrease maintainability. @timstaley what do you think? |
Is there any progress on this issue? From what I understand, the RMS clip is also really useful for AARTFAAC as well as all the other non-LOFAR telescopes. So, as a minimum, can we get my original option 1 implemented ASAP?
|
this has been implemented in banana and has been waiting your feedback for a while now. If the numbers seem to make sense I can try to implement it into TraP, but there is not a lot of time left me working at API. I don't really like hacking features into TraP last minute. |
correcting myself, the gaussian histogram fitting has been implemented. If the numbers and graphs make sense that could become the quality check. |
I had already looked at the Banana outputs and said it was fine and closed the issue (transientskp/banana#71). However, this quality check needs implementing in TraP and not Banana as we do not want to be running source extraction, source association or updating runcat source parameters using the images that fail quality control. But my understanding is that in Banana it is the full fitting strategy and not the strategy that would work in a streaming mode for AARTFAAC images. My option 1 would work for AARTFAAC images and could be improved in the longer term. |
I'm quite sure you didn't look at the banana output, this issue is about Op 19 okt. 2016 4:06 p.m. schreef "Antonia Rowlinson" <
|
I looked at Banana and did not use the notebook as it was not necessary. |
Ok in that case the numbers are probably sound and will use this method to Op 19 okt. 2016 4:26 p.m. schreef "Antonia Rowlinson" <
|
I have now confirmed this is roughly working but has some issues for users. These changes to be made for R4.1:
|
Fixing the set_sigma and getting this fully working is a goal for Release 5.0 |
Started initial work on this. Introduced a new parameter in job_params.cfg to reject images based on the distribution of the image rms values from the histogram. Default is 3 sigma, i.e. an image whose rms is more (or less) than 3 sigma from the mean of the rms of the other images will be rejected:
The code is in place in branch Issue512 but needs testing. https://github.com/transientskp/tkp/tree/Issue512 |
This issue is completed for Streaming mode and can be closed with the pull request #591 |
The RMS noise check has proven to be the most powerful method for identifying bad images. This method works best by modelling the typical RMS noise in the dataset and then using a sigma threshold.
TraP now stores this number for all images, making it fairly straight forward to implement a check for non-LOFAR images. For LOFAR images, we use a comparison to the theoretical noise but this is not appropriate for non-LOFAR images.
As this is the most useful check, I have already written an off-line version of this strategy which works really well for MWA data and Yvette has used on AARTFAAC data. It produces an images_to_process.py file that can be read by TraP and a plot of the typical RMS noise values. I will upload the most recent version of this script to GitHub later today.
The text was updated successfully, but these errors were encountered: