Skip to content
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

Operations history? #10

Open
low-sky opened this issue Apr 27, 2014 · 2 comments
Open

Operations history? #10

low-sky opened this issue Apr 27, 2014 · 2 comments

Comments

@low-sky
Copy link
Contributor

low-sky commented Apr 27, 2014

Since a lot of the minor methods are order dependent, should the methods in this packaged track a history of operations, perhaps as an extended string array so that you could get something like:

>>> noise_object.history()
Noise created from cube with shape (70,500,500).
Initial uniform scale of noise: 0.0024 Jy/beam
Signal masked out with SNR threshold of 3 with 1 iterations
Spatial and spectral norms estimated using MAD method with 1 iterations
Signal masked out with SNR threshold of 5 with 3 iterations
Spatial and spectral norms estimated using MAD method with 3 iterations

This seems more important for masking history.

@akleroy
Copy link
Contributor

akleroy commented Apr 28, 2014

We could definitely do this and it seems reasonable.

There are logger modules or we could write our own very simple one.

I guess as a first step, maybe we just start by having each routine optionally output a report.

@keflavich
Copy link
Contributor

It would be nice if the history generated a reproducible report, e.g. instead of Erik's proposal, something like:

>>> noise_object.history()
noise = NoiseCube(...) # Noise created from cube with shape (70,500,500).
mask = noise.signal_to_noise(3, iter=1) # Signal masked out with SNR threshold of 3 with 1 iterations

...obviously my example uses nonsense code, but the idea being to output code one could reuse rather than a pure description.

In terms of the infrastructure, for now it may be best to just pass this in the meta property. It looks like noise doesn't have that yet, but spectral cube does. Then noise.meta['history'] = 'history line 1\nhistory line 2' or something along those lines.

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

No branches or pull requests

3 participants