-
Notifications
You must be signed in to change notification settings - Fork 2
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
PipelineProduct.save()
: distinguish between allframes
and usedframes
#79
Comments
Three comments to your proposal:
So while I would prefer we design our recipes that such an escape hatch for providing the data lineage is not necessary, we didn't actually discuss this, let alone get an agreement on this. So if the rest of us think it is good to have the option for manual data lineage, then we should make this possible. |
There is a reason why the cpl function takes two framesets rather than one. Lars should be able to guide us. |
We can decide to be stricter for ourselves than required by ESO, and not write recipes that require such functionality. I would be an advocate of such a restriction because that would ensure we don't make mistakes, and would (in my opinion) result in better recipes and workflows. But we did not have that discussion, let alone arrive at a conclusion, and there might always be exceptions. So I said that you are right and that we should make it possible to manually select a subset of the input frames as used frames. I just don't think we should use it ;-). |
I know about this, it was meant as a temporary workaround. I am already working on a robust mechanism for recording which frames were actually used. |
It requires me to convert |
I'll copy my comment from #87 because it actually applies to this discussion.
A bit more that is not in my #87 comment: It seems that #85 determines on the recipe level whether each input is valid, and discards the input from the used frames if it is not valid. This is a less common usecase for the used frames I think (but I have not checked). In the two cases above, all input can be valid, it's just that they are not all used for all output. I also would like to note that an 'invalid' frame could still affect the output, and in that case should still be counted as used frame. For example, if there are 10 input raw flats, and a median filtering is applied to determine that one of the frames is an outlier and should not be used in the stacking. Then that one invalid frame would still have contributed to the median and therefore does affect the output. As in, rerunning the recipe with only the 9 valid frames might cause a different result, because then maybe one of the other frames would have become an outlier. This might be rare though. Summarizing that last point: I think that rerunning the recipe with only the used frames in the SOF file should give the exact same output product (except for timestamps and such). If the output product would be different when a specific frame is omitted from the input SOF, then that specific frame should be part of the used frames of that output product. |
Not reading through this discussion and just dropping something that I just noticed: |
Yes that's what I said. What's the point of these issues if we don't read what the other people write? |
Where? |
Here:
I did not describe technically what is in the code, as I assumed that Martin knows that since Martin wrote it. Perhaps I used a bit too many words? Let's not argue though, and instead spend our time making things work. |
My point was just that the current implementation (supposedly already a fix) does not seem to do what you correctly say it should do. |
@oczoske Sadly, yes.
|
The function
cpl.dfs.save_image()
takes two framesets in its argument list:allframes
: "The list of input frames for the recipe"usedframes
: "The list of raw/calibration frames used for this product"Our method
PipelineProduct.save()
passesself.recipe.frameset
to both arguments, which is not always appropriate. As an example, WCU templates take a number ofWCU_OFF
frames, that are to be combined and subtracted as background from theWCU_ON
frames. It is not unreasonable to want to save the background frame as an intermediate or temporary pipeline product. In this case,usedframes
should not include theWCU_ON
frames as these were not used in the creation of the background image. I'm sure there are better examples among the more complex pipeline recipes.The text was updated successfully, but these errors were encountered: