X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 08 Apr 2010 12:54 PM by  anon
Adding function to spectral plot window
 1 Replies
Sort:
You are not authorized to post a reply.
Author Messages

anon



New Member


Posts:2
New Member


--
08 Apr 2010 12:54 PM
    I would like to add a function to the ENVI spectral plot window in a manner in which the currently displayed spectrum is sent to be processed by the function (when selected by the user from the "Plot Function" drop-down list).  I added the following the the "useradd.txt" file: {plot} {MICA Analysis} {interactive_mica_from_plot} {type=0} It works fine for a single spectrum, but when I move to a new location in the image window, the function begins to execute again with the new spectrum.  Also, if I have multiple spectra displayed in the plot window, all are sent to be processed by the function.  Is there a way to have the function execute on only the most recently displayed spectrum and to return and reset the plot function mode to the mode it was in (e.g., normal or continuum removed) before the user selected the added function?

    Deleted User



    New Member


    Posts:
    New Member


    --
    13 Apr 2010 11:39 AM
    I think you and I would like to have the same thing.  I've asked for functionality like you describe before, but perhaps not clearly enough. It'd be nice to have a "send to" command in the plot window interface that works like the "send to" functions in Windows.  What i would think the plot wiindow "send to" command would do is take the currently displayed spectra and more or less pipe that to spectral math, except without all of spectral math's limitations (can't read to/from a spectrum, has to also return a spectrum as output,etc.).  You should be able to write code to do anything  you want with the spectra being piped.  Even the plot's metadata (plot ranges, linestyles, etc.) should be piped. This would be *very* handy to have for a lot of the stuff i do and my group does.  As it stands, the best we can do is write a routine that grabs a spectrum from under the cursor of an image in a display, which kinda sorta gets me where we want to be, but then that creates limitations also.  Particularly if we want to take a spectrum from an image and then a spectrum from a spectral library and then run the same routine on it.  If we could pipe a spectrum from a plot window to our routine, we could easily do both.  I really hope this gets added to ENVI. Jeff
    You are not authorized to post a reply.