Jump to content
PDS Geosciences Node Community

IDL & 2014 CRISM Summary Parameters


Recommended Posts



This is largely an IDL question concerning the new release of 2014 CRISM summary parameters in the CAT v7.3.1, so I'm not sure if it's appropriate here.


I am working with:




Is there a way to bypass the control widget in 'select_summary_params.pro' and simply generate the default selections (basic products) without waiting for "OK" to be pressed?

I want to link several CAT pre-processing steps together and don't require the widgets, but I am finding it difficult to manage widgets and events in these pro files because I am a beginner with IDL. I have looked into all the available IDL help files, but am still having trouble getting around this. 


I think my main problem is understanding where/how the program stores the event that the OK button is pressed in 'select_summary_params.pro'.

I can see the structure of the widget being created in the second half of the pro file, then it is handed off to xmanager ~ line 236

Then an event, such as a button press, must occur in order for its uvalue to be returned to the event handler in the upper portion of the code ~ line 28

I only require the possibility of 'OK', because I don't want any other selections to be made or changed. But if I manually set uvalue to 'OK', it's not linked to any event ID, so I don't think it is recognized in any case.



Link to comment
Share on other sites



I don't see an easy way to bypass clicking OK on the parameter selection dialog. As you suggest, sumpar_widget_event is only called when an event occurs - like pressing OK on the selection dialog.


Maybe you can bypass the entire select_summary_params call though if you know ahead of time which parameters you want to compute. The key input to select_summary_params is summary_list, which is just a string array containing names of all the parameters. Create an integer array containing the indices (in summary_list) of all the parameters you want to compute. Use that in as selected_params which is the important output from select_summary_params.


Here's an example with a shorter-than-reality list of parameters:

summary_list = ['BDI1000IR', 'OLINDEX3', 'R1330', 'BD1300', 'LCPINDEX2']

Let's say you want BDI1000IR and R1330 only. Then:

selected_params = [0,2]

And you can set that manually (or with code of your own) and skip the select_summary_params call entirely.


Hard coding the indices may be risky. I think the summary_list array will always be the same for a given detector with the current CAT code, but may change with updates. So you may want to insert some simple IDL code to get indices for desired parameters vs. hard coding them, if you want the code to survive very long.



Link to comment
Share on other sites

Thanks so much Frank for helping me find a way around this problem.


I have now avoided calling select_summary_params entirely by taking the subscripts of the basic parameters from lvl (which just separated basic and advanced):

selected_params=where(lvl eq 1, lvlsel)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...