Nikea / xray-vision

Visualization widgets and plotting helpers targeted at X-Ray Sciences
Other
5 stars 13 forks source link

Dynamic cmap #79

Closed CJ-Wright closed 8 years ago

CJ-Wright commented 8 years ago

I have started doing some plumbing to allow for the default values of the stack explorer to be set during its initial call.

CJ-Wright commented 8 years ago

How are the defaults set for the normalization and range?

ericdill commented 8 years ago

That is a good question... Let me re-learn this code and answer that for you

ericdill commented 8 years ago

range is the intensity range of the image?

CJ-Wright commented 8 years ago

Yes I think so, My hope was to set the defaults to log normalization and 5 to 95% range, since that seems to be what I use the most

ericdill commented 8 years ago

Ok, see cj-wright/xray-vision#1 for a minor tweak to set the range. You can add something like this:

        self._ctrl_widget.set_image_intensity_behavior('percentile')
        self._ctrl_widget.set_limits(25, 75)

to the __init__ of CrossSectionMainWindow and then pass in those values as kwargs or something

ericdill commented 8 years ago

looking at the log norm now

CJ-Wright commented 8 years ago

It seems that even though the cmap box says the correct map, that map is not implemented. Do you know what could be happening? @ericdill

ericdill commented 8 years ago

Let me investigate

ericdill commented 8 years ago

@CJ-Wright check out cj-wright/xray-vision#2... That should fix these problems.

CJ-Wright commented 8 years ago

Awesome, it works and also fixed the bug which caused it to not load data at the start! Thank you very much @ericdill

CJ-Wright commented 8 years ago

I think this might be ready for review/safe to merge. @tacaswell @ericdill

tacaswell commented 8 years ago

:+1: I only gave it a cursory read, but nothing jumped out at me. If it works, it is probably good to merge.

ericdill commented 8 years ago

Awesome, thanks @tacaswell. Thanks for the effort on this @CJ-Wright; your code + desire to see this functionality makes the cross section widget much more useful.