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

Document dtypes used and conversions #40

Open
cdeil opened this issue Jun 30, 2017 · 1 comment
Open

Document dtypes used and conversions #40

cdeil opened this issue Jun 30, 2017 · 1 comment
Assignees
Milestone

Comments

@cdeil
Copy link
Contributor

cdeil commented Jun 30, 2017

I'm splitting out one point of discussion from #30 : we should have a strategy how to handle different dtypes (int, float) and when conversions occur. This is a reminder issue for @adl1995 to write a small docs page describing the behaviour and to add tests asserting it.

At the moment it looks like the scikit-image transform we call always outputs floats, it can't output ints directly (this kinda makes sense, interpolation methods usually need floats as far as I know).

So for now, we're calling with preserve_range=True, which gives back float64 with roughly the same values as the input int16 image in our FITS test case.

preserve_range : bool, optional
Whether to keep the original range of values. Otherwise, the input image is converted according to the conventions of img_as_float.

There's several things to discuss / decide here, namely whether to convert to float32 by default to save space and avoid the float64, whether to provide options in hips to convert back to int images, or whether to only document to users how to do that, ...

@cdeil cdeil added this to the 0.2 milestone Jun 30, 2017
@cdeil
Copy link
Contributor Author

cdeil commented Jul 17, 2017

I've added some info in this docstring: 9b52a7a

I'm keeping this issue open and assigning to myself, the remaining task is to explain this clearly in the high-level docs.

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

No branches or pull requests

2 participants