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
Independent thresholding for each layer in composite maps #1697
Comments
I think that adding somthing like |
Hey i would like to give it a try |
@ajamesucl @dpshelio so need to set different contour threshold levels in each layer and if it is less than vmin than =vmin else equal to level. Similar for vmax . |
Just to be clearer about what I specifically would like to do: in my example, the composite contains two layers. The first being a map of the Sun, and then contours taken from another map are overlayed as a second layer. For example, to plot magnetic field strength contours from an HMI magnetogram on top of an AIA image of the Sun. The problem is that I would like to plot each layer with different thresholds. So I would like to plot between a 'vmin1' and 'vmax1' for the base layer, and plot the second layer between a 'vmin2' and a 'vmax2'. But yes I think you understand right about what the thresholding does. Thanks! |
def set_minmax(self, index, levels, vmin, vmax):
is this right?? @ajamesucl |
@abit2 you should do this as a Pull Request and link in the comment with this issue number, that way the repository is tested automatically (and checks whether that breaks something) and we can provide inline comments. I think you are confusing the two things composite maps can do, one is to overlay contours on top of an image (controlled by levels) or you can visualise two images with semi-transparency (alpha value). The case @ajamesucl is talking about is the last one, and does not have to do with levels. The way I would do it is similar as set for alpha - as that is a matplotlib parameter. |
@ajamesucl Perhaps you are aware of this, but if you are mixing AIA and HMI data, the two instruments have different plate scales (CDELT*) - AIA is ~0.6 arcsec/pixel, HMI is ~0.5, so the HMI data needs to be scaled down. I'll be doing an "hmiprep" with a plate scale option and optional removal of the limb noise on magnetograms. |
@larrymanley Thanks for the help! I just checked the CDELTs for my AIA and HMI images and both are the same at ~0.6 arcsec/pixel. I've been getting and prepping my data with IDL Solarsoft, so I had used the aiaprep function on both sets of data, which must have accounted for the HMI scale. |
@ajamesucl : I want to take a stab at this. Could you give me a use case, specifically, any two fits files for the maps that you're using for this feature (#1697 (comment)). This would help me understand and work out the plot more clearly. |
Hi @sudk1896 I've included a Dropbox link to an HMI fits file and an AIA fits file that I'd like to turn into a composite map, as well as some basic code to do this: https://www.dropbox.com/sh/ws1e2bsr9nu0p9s/AADUIu0dDy7bLjc6OG2s6XsTa?dl=0 My request is that I would like to plot each map in the composite between different limits. For example, I would like to plot the HMI map layer between vmin1=-2000 and vmax1=+2000, and plot the AIA map layer on top of this between vmin2=0 and vmax2=1500. |
@ajamesucl: No problem. I would get started on this. |
That does look like what I was hoping for! Thanks! I tried changing the scale of that HMI image from 0.5 arcsec/pixel to 0.6 so it matched AIA, but this actually seemed to throw the alignment of features off. |
@ajamesucl: Do you still want me to work on this ? |
The code needs to be implemented, @larrymanley have you changed how map behaves? would you be able to do a Pull Request with the changes? |
A few notes:
The first two images above are still off a little bit because of the padding in rotate (issue #1691). I've got a fix for aiaprep but I need a full-res (4096x4096) level 1 file for the the test. I used Numpy clip on both maps rather than using vmin/vmax in the plot settings:
When I do my AIA movies I pop the 'norm' out of plot_settings because I do "LMSAL-style" intensity scaling. It doesn't appear that compositemap works without the 'norm' in the plot_settings of the AIA image. I think this type of composite is a good example of why 'norm' should be optional (line 460 of compositemap.py). |
Thanks @larrymanley for sharing!! Thanks for the @sudk1896 what I would like to see implemented is within the |
|
@ajamesucl: Can you post the dropbox link again. It has expired. I would like to resume where I left off. Thanks. |
@sudk1896 you don't need to use his data for this, you can use the sample data in SunPy, take any two maps, if you want to get closer to his example use the AIA171 and the HMI |
Yes, #1906 closes this. This is because there are now get and set methods On Thu, Oct 13, 2016 at 7:33 AM, Stuart Mumford notifications@github.com
|
When using the composite map feature, I'd like to be able to set different vmin and vmax constraints for each layer. At the moment, I can set an overall vmin and vmax for the plot, but the scales of the plots used in each layer are different, so one-size-fits-all thresholds aren't appropriate.
Something similar to the alpha value that can be set for each layer would be great.
The text was updated successfully, but these errors were encountered: