An important part of iolite is the time ordering of data. This allows iolite to accurately model time-dependent phenomena such as sensitivity drift, mass fractionation and baseline variation. Unfortunately, some older Agilent files may not include a timestamp. This may not be a problem if you need to load just a single file: there is always a record within the file of when each datapoint was collected relative to the file start time. However, iolite still needs to know when the file started. You could just add a dummy line like the one below as the third line in the file so that iolite can load the file, and all the internal timing will be consistent:
Acquired : 2020-01-11 12:48:10 using Batch FakeTimeStamp.b
However, if you have multiple files from the same analytical session, you need a more accurate timestamp so that iolite can import the files in their correct time order. One approach used here is to make use of the file’s metadata. Every file stores the date that it was created. If this timestamp reflects roughly the time the sample was run, we can use this as our timestamp. I’ve written a short script below that you can use to insert the ‘Acquired …’ line from above, with the file’s creation date as the timestamp.
There are a couple of things to note though: sometimes a file’s creation date is reset, either by copying it, or sometimes by moving it between operating systems (e.g. sending it by email). In this case, the file creation times are very recent, or they are all within a few seconds of one another, so they’re easy to spot. If the file creation times look right, you can use the approach below.
The script assumes that you’ve got a folder containing the .csv files (the ‘input’ folder). It will also ask you where you want it to write out the edited copies (the ‘output’ folder). The output folder needs to exist before you run the script.
NOTE: Any files in the output folder with the same name will be overwritten
If there are already files in your output folder and they have the same name as the file being edited, the earlier file will be overwritten. I suggest creating a new output folder for each input folder.
|
|
If you have any questions, comments or suggestions about this Note, you can discuss it here