viperleed / viperleed-imagej

ViPErLEED-ImageJ is a collection of ImageJ plugins for spot tracking and intensity evaluation as well as selection and editing of I(V) curves created by the Spot Tracker.
Other
1 stars 0 forks source link

Allow curve editor to treat multiple IV-curve files #7

Closed michele-riva closed 3 years ago

michele-riva commented 3 years ago

This came originally from a request from @jbahlmann. Here is a summary of an email exchange between @jbahlmann, @fkraushofer, @michele-riva, and @schmid-iap.

@jbahlmann: Fri, Apr 30 2021 Regarding the calculation of beams with imageJ: My experimental data are divided into two seperate sets due to degradation and issues with an energy dependant incident angle. What do you recommend, how to treat those data? I could just put the images together, but then there is a shift in positions, beam current, intensities,... . I am not sure whether this is an good solution. Maybe evaluation of the single parts and merging the resulting EXPBEAMS files is a better approach. But then I would need to treat the overlapping energy range somehow to have a smooth transition. Do you have different ideas?

@fkraushofer Hmm, interesting question, probably something for @schmid-iap / the curve editor. Yes, I would say a smooth transition from one to the other is best.

@michele-riva: A smooth transition would be ideal. Since we're doing something like this already in the curve editor [ndr: for treating those symmetry-equivalent spots that may not have intensities over the whole energy range of other symmetry-equivalent beams], one could use the same merging algorithm. Probably @schmid-iap is the best person to address this in detail. I don't know if he has something in place (or planned) for handling multiple videos, but probably doing a smooth transition between curves that have already been extracted from the data and normalized to the beam current should not be as much complicated.

@schmid-iap Appending two stacks does not seem a good option - there will be a jump of intensities (obviously, RPendry is sensitive to this). I think the best option would be to have some overlap (say, 20 eV). Then I could think of creating a utility that smoothly merges the I(V) curves, maybe taking a factor (average ratio in the overlap region) between the two measurements into account. This is probably better than smoothly merging the image stacks: "Energy dependent incident angle" sounds like the spot positions won't be the same and smooth merging would result in elongated spots where the two image stacks would overlap.

michele-riva commented 3 years ago

This tool would also be a good addition for LEEM-IV measurements performed by @AlesSala. In fact,

@michele-riva He says that one needs to acquire IV movies in a couple of chunks (e.g., 20-100 eV + 90-450 eV) as the MCP voltage has to be adjusted in between. I suggested that one extracts IV curves from the two (or more) chunks with the tracker, and then post-process them in the curve editor. This is more or less what @jbahlmann already asked, so it is probably good if the curve editor would allow one to load multiple 'raw' files.

This is currently in the works:

@schmid-iap A utility for stitching I(V) curves with some overlap is planned. It would adjust the intensities of the 2nd measurement such that the sum of all intensities where there is an overlap is the same for the first and 2nd series of measurements. Then it should apply a smooth transition in the x-axis (energy) range describing the overlap.

schmid-iap commented 3 years ago

Release v0.5.3 adds Average I(V) Curves and Stitch I(V) Curves in the ImageJ Plugins>ViPErLEED menu. For stitching, if there is some overlap, a smooth transition is used. (The weight is a linear function from 0 to 1 in the overlap region.) Since some beams may have almost zero intensity in the overlap region, there is one common scaling factor for all beams: For each dataset, the sum of all (non-negative) intensities (restricted to data also present in the other data set) is determined for the overlap region. The ratio of these sums is used for normalizing the second data set.