User Tools

Site Tools


nanosims:lans_extras:huge_files

Processing of huge IM files

2013-10-26

I have a very large *.im file (>700MB) and my computer does not seem to be able to process it in 'one shot', most likely due to limited memory. Can I process the data in parts, for example by loading only specific masses or specific planes?

Possible solution

Yes, this is possible by following these processing steps.

  1. In the Input menu of the main LANS GUI, check Ask for range of planes and masses before loading.
  2. From the same menu, choose Load RAW dataset and select your *.im file.
  3. In the dialog window that pops up, select the masses you want to load. Use shift or ctrl together with a mouse click to select multiple items in the list.
  4. In the next dialog window, specify which planes you want to load. By default LANS suggests to load all planes. Here you can use any valid Matlab expression for a vector. For example use 1:10 to load planes from 1 to 10, or 1 2 5:9 20:30 to load planes 1, 2, 5 to 9 and 20 to 30.
  5. After the selected masses and planes were loaded, process the file in the usual way. Specifically, take the steps that will allow you to accumulate the measured planes with the drift correction applied. For this it is recommended to first load masses that are of sufficient quality (low noise and clear spatial structures) for a good alignment. Importantly, this step will produce the alignment data and save them in the file xyalign.mat.
  6. Autoscale accumulated images.
  7. Display masses. Apart from displaying the masses, this step will also save the accumulated ion images in the *.mat format. They will be useful later.
  8. Repeat steps 2-4, this time selecting the other masses from the *.im file and the very same planes as before.
  9. Accumulate plane images. Note that this time the planes of the loaded masses will be aligned using the alignment data stored in the xyalign.mat file generated in step 5.
  10. Proceed with steps 6 and 7.
  11. Repeat steps 8-10 if necessary, until you process in this way all the masses recorded in the *.im file and produce the corresponding *.mat files.

In the next stage of processing, you need to generate a preferences file that will contain information required to load all the *.mat files generated in the previous processing stage.

  1. Make sure that Ask for range of planes and masses before loading in the Input menu of the main LANS GUI is still checked.
  2. Load RAW dataset and select your *.im file.
  3. In the dialog window that pops up, this time select all masses.
  4. In the next dialog window, select only the first plane by entering 1.
  5. Note that in the Output directory text field the output directory became modified by a suffix like _p1-1. Delete this suffix. This step is critical, because it will allow you to save the preferences to the correct folder where they should be stored.
  6. In the Input menu of the main LANS GUI, uncheck Ask for range of planes and masses before loading.
  7. Store preferences using the Preferences→Store preferences menu. Let's store them under the name prefs.mat. Note that the folder where you store them should be without the suffix that indicates that only one plane was loaded (_p1-1; see point 5).

Now you are ready for the final stage.

  1. Make sure that Ask for range of planes and masses before loading in the Input menu is unchecked.
  2. Choose Load ACCUMULATED data from the Input menu.
  3. Select the preferences file prefs.mat you created in step 7 above. This will load all the accumulated masses stored in the *.mat files.

You can now proceed with data processing in the usual way. That is, auto-scale accumulated images, define ROIs, export ratio images and ratio data in ROIs, make scatter plots, create PDF output, etc. Don't forget to store preferences (in the same prefs.mat file) at the end of your dataset processing session! This will allow you to use the same settings in the future.

Few notes

Clearly, once you have loaded accumulated data, you cannot do operations that assume multiple planes, such as plotting depth profiles in ROIs for all masses at once. If you really want to look at depth profiles, though, load the data again in parts and process them as described in steps 1-4 and 9 above. Then, load ROIs from disk using the ROIs menu. Now you can plot depth profiles of (and only of) the selected masses.

Back to the list

nanosims/lans_extras/huge_files.txt · Last modified: 2017/11/15 20:39 by lpolerec

Page Tools