Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

NGR Software Upgrade

Scope

This report will discuss the software upgrade from NGR Master to IMS 10.2. The goal of the software upgrade was to streamline the software and integrate the NGR with the rest of the IMS track systems within the Physical Properties Lab. While the software and measurement precision was thoroughly evaluated there are still some outstanding bugs and more testing to be done.

Replacement Process

Initially, during the Subic Dry Dock (June 2018) the NGR track hardware, specifically the Galil hardware, was replaced with the new M-Drive motor and interface board. Once the M-Drive was in place the NGR Master Software was no longer compatible with the track’s motion control system.

 

Bill Mills began work on the NGR IMS software in September 2018. By early October the software was ready for testing. The following was Bill’s update to all interested parties on October 10, 2018:

1. Developed a utility that steps a radiation standard (using the fan holder) 1 mm at a time through the entire range of the track recording the total counts for each detector against the track position. The center of the response curve is found via a Gaussian fit of selected data (removed shoulders and other asymmetries, see screen shot on last page). The relative values produced are in good agreement with the expected. The procedure breaks the relationship between NGR MASTER and the physical position of the track’s home switch. This utility should be ran anytime there are physical changes to the track system.

2. Developed an automated calibration method for all 8 detectors in the IMS code: it works as follows: (assumes that the detector’s bias voltage has been correctly set for all detectors before proceeding)

a. A combination of the Cs and Co standards are place in the first position of the calibration boat.

b. User selects the AUTO-ENERGY CALIBRATION from the IMS INSTRUMENT menu.

c. The user is prompted for the offset from the top of tray and the live time (fixed min of 120 sec) to be used. Press GO.

d. Track moves the source under each detector and collects the spectrum for the duration of the live time value. As data is collected the Cs-137 662keV and the two Co-60 1170 and 1330 keV lines are automatically located and the resulting fit displayed. User can watch fit values “firm up” as data is collected.

e. After completing the calibration measurements for all 8 detectors, a summary view of the energy corrected spectrum is displayed in a composite view where any mis-calibrated spectrum can be clearly seen. The user can review each fitted data, slope, intercept, r^ and dead time, as well.

f. User accepts or cancels the calibration.

3. SPE spectral files (background, calibration and sample) produced by LabView are correctly read by Maestro. Also, I noted that the Masetro was saving a 3 order polynomial fit for the MCA_CAL and ENER_FIT fields but it is my understanding that this is just a linear fit. Values entered from the calibration described the above correctly display energy calibrated data when opened in Maestro.

4. Background data is collected for all detectors at both positions and both position are used. I believe the previous program only used 1 position.

5. First sample position in the previous code made a measurement at 0-cm. We should never measure anything at 0-cm, I changed the code so that the first measurement is at 10-cm

6. Replaced all functionality of the NGR Master C code with LabView. Changed the process flow as described below:

· Edge corrections are done in real time and displayed to the user along with the uncorrected data as it is collected.

· Error analysis and the csv file output completed at the end of the section measurement. Although… I have questioned why is this type of error reduction in the data collection program? This seems to violate our standing policy of only collecting the data (and associated meta data). Also, the documentation is lacking on how this process is done. I relied on Maggy’s spreadsheet (NGR data redux analysis.xlsx) to derive the formulas; and, while I can plug the numbers from the spreadsheet in to the LabVIEW code and get the same results, I make no guarantee about this part of the code. It will require someone us else to validate its accuracy.

· Config file keeps a record of all necessary data. There is no need to open and read the data for the data reduction process as before …much faster. The program does check that the files exist before allowing a measurement to be started.

· The Farpoint dll dependencies are gone.

 

As the above states, the new software added a lot more capability within one interface than the previous NGR Master software. This new software was written using the foundation of the shared code amongst all the IMS track systems. The idea guiding this is that each track has a similar structure, but be individually different per the requirements of the particular system.

 

Testing at this point focused on finding bugs in the software. It also encompassed analyzing the data output files, checking calculations and formulas, and written in the form required by the IODP database. The initial findings showed large amounts of bugs within the software, however, these initial bugs were quickly fixed after they were reported. The data output originally did not match the spreadsheet provided by Peter Blum due to rounding errors, something that was also fixed quickly. The file naming was a discrepancy as it was different than it had previously been, IMS looks for a numerical value instead of a character value requiring the nomenclature to be slightly different.

 

The immediate need to understand how IMS was performing the required analyses was extremely high. We ran 375 play cores over a period of weeks, with shore and ship personnel looking at each file output. Originally, we found differences between the original data file formats and the new formats. Most of the formatting was corrected, but IMS still required some minor changes to work properly. The main difference that still remains here is that IMS only writes files for the used detectors where NGR Master wrote files for all detectors regardless of whether they were used (this depends upon section length).

 

Each iteration of the software was days apart requiring personnel on board the JR as well as on shore to work quickly to check the data and report any issues found. Reported bugs were fixed quickly but there were delays due to discussion regarding correct reporting methods for specific files. This process was slow and tedious, more so than it would have been if the upgrade was more of a structured project.

 

The one thing we did not want to carry over from the previous software was the 2 position background, given that in NGR Master only 1 position was actually referenced. Within the new software, the background runs for a total of 21,600 secs (6 hours). This is the equivalent of running 1 position previously, the new software then only writes 8 files and uses those files for each position.

What’s new in the NGR IMS 10.2

Energy Calibration

The Energy Calibration is now a utility in IMS. The new calibration standard (a collimator with Cs and Co sources) is placed at the top of the Ti tray and the software steps through each detector. We no longer need to move the aluminum calibration holder in out of the NGR and move the standards four times (the old method required placing the two uncollimated sources between adjacent pairs of detectors).  Maestro can still be used to do the energy calibration though.

Background

In NGR Master the background was measured at two positions although the software only used 1 position. In IMS the background is only measured at one position. There is no need to turn of data reduction as in NGR Master. As a result, only eight background files are written instead of sixteen.

File Types

IMS writes a ‘.NGR’ file that uploads to LORE. The .NGR file has the same information that the ‘.SUMMARY’ file from NGR Master would write.

File Locations

‘.NGR’ files are written to C: > DATA > IN. Background spectral files, edge correction table, energy calibration spectral files, data reduction, sample spectral files, and zip files are written to C: > AUX DATA in their corresponding subfolders.  Within these subfolders, files are segregated by site-hole folders.

File Information

The file information is similar to the NGR Master files, there is only the instrument name within the .NGR file and the file name itself that differ slightly from what they were previously. This information and naming convention is consistent with IMS tracks.

Zip Files

Zip files now include an .ini file containing NGR-specific configuration information.

Position 1 and Position 2

The position of the Ti tray now moves 10cm past detector 8 and begins measurement for position 1. After the measurement is complete it moves 10cm back to measure for position 2. Essentially measuring 10, 30, 50, 70… first and then 0, 20, 40, 60… last. This measurement scheme differs from what IMS was originally set up to do, which was to completely scrub the 0cm measurement, since the edge correction for it is so large. The positions and offsets match between IMS and NGR Master but IMS measures in the opposite order.

What Was Tested/Checked

Background spectral files

The Background .SPE files were checked thoroughly. The spectral data was checked for the correct number of channels and proper display of header information. There is some new information in the header that was either added or changed to maintain consistency with the IMS framework.

Energy calibration spectral files

Energy Calibrations measured within IMS were compared to calibrations done in Maestro. Energy Calibration files were checked for the correct number of channels, correctly displayed header information, and energy fit equations.

Data reduction (.CSV files)

The Data Reduction files were checked for accuracy of calculated data. Background and Energy Calibration files were used to calculate threshold channels and see how the numbers stack up. There were several issues with incorrect significant figures of data, which has since been resolved. At one point, the files were pointing to the incorrect detectors, which has been resolved. IMS picks threshold channels inconsistently, usually over or undershooting a channel for one or two detectors. This issue is still outstanding and to work around it we can calculate the correct threshold channel and manually insert it into the .ini file.

Edge correction table

The Edge Correction Table was checked for correct values and minor changes were made to number display and column headers.

Sample spectral files

Spectra were checked for the correct header information and correct number of channels.

Zip files

The Zip Files were examined to make sure all run-specific files were included.

LORE reports

LORE reports prior to the software upgrade were compared to LORE Reports with the new software. Both reports display the same information. Note that the LORE column ‘NGR Total Counts (cps)’ refers to ‘Total Corrected Counts/Sec >100KeV’ in the Data Reduction File and ‘total_counts_per_sec’ in the .NGR file

File names and types

File Names and types were checked to ensure the same information is uploaded in the same way.

Outstanding Issues

The bug list below shows the report bugs seen during testing, the grayed-out bugs are the ones that have been fixed and the ones that remain are to be addressed on the next iteration of the NGR IMS software.

  • Background measurement top graph x-axis – shows “offset (cm)” should be “Detector #”
  • On main section page, upon initial start the counts/sec graph is missing until run of section starts
  • Long term monitoring page – no option to save; export issue 1. Export to clipboard – blank image, 2. Save image – blank image, export to excel returns values. X-axis time issue, the time remains at zero continuously
  •  Energy Calibration setup – default values are not remaining, each time the page is open they reset to, this behavior has only been seen sporadically
  • energy calibration ROI picks are not formatted correctly to show in either Maestro or WinPlot.  Either app displays one huge ROI starting at the first channel pick and extends to the last channel in the file.
  • Missing top – detector offset changes based on the value entered for missing top, large missing top values result in detectors beginning with 1, 2, 3, etc. to not be used, this should be the opposite, where missing top removes the usage of detector 8, 7, 6, and so on
  • Using LIMS to select a section – creates a XXXX-timestamp file in a manual entry folder
  • Abort run function “oops pls continue” – 2 different behaviors observed 1. “oops pls continue” does not continue run, files are written from the about point and the track returns to load position, 2. “oops pls continue” continued run, but immediately moved to position 2 not completing position 1 measurement. - Will be fixed at a later date
  •  Offset for measurements is 10, 21, 31, 41, etc…, should be 10, 20, 30, 40, etc
  • No field for Username input
  • The Total Counts/Sec graph is placing the last histogram past the length of the section on short sections (<75cm), should this be cut off at the section end?
  • Composite Spectra Graph 0 on short sections (~<75cm) in use detectors are not plotting all energy channels, only seeing from ~500-1400KeV for the detectors closer to the end of the section
  • Energy Calibration - option to adjust threshold search and peak width while running the calibration does not overwrite the original defaults, writing the incorrect/original selection to the calibration files
  • 100 keV threshold - seen in 375 1518D 1H1 Detector 7. The value was 100.73, IMS considered it under 100, choosing channel 46 instead of 45.
  • In NGR Instrument Setup - the serial numbers for Detector 1 and Detector 2 are the same. The user does not have the ability to change these nor the files that are referenced. Additional, seen once - detector one took on detector two's offset and when a section/calibration was run the data overlapped for those 2 detectors. In order to get detector 1 back to the its original settings, I had to remove the .ini file and restart IMS letting it revert back to default settings. This did begin when I tried to change the calibration files with the the folder and not from IMS.
  • .SPE files and Threshold Pick - for the threshold pick in a file with channels 0-1023 the <100 is including the threshold channel, when it should be the threshold channel-1. The >100 is using the threshold channel + 1, when it should be = to the threshold channel.
  • Single Detector Calibration - choosing a single detector seems to cause some issues when the files are referenced during a sample run, this is not observed every time - removed for now, to be added back?
  • Instrument name inside .NGR file too long; could cause formatting issues with LORE reports (TBD)
  • LORE expanded report needs modification to include configuration component
  • energy calibration spectral files lack a delimiter at the start of the channel data
  • no position designator at the end of a sample spectral file name (d1p1 etc) -Position requirement dropped
  • no position designator inside a sample spectral file (can only tell by timestamp inside file, or sample's offset.
  • all detectors should write spectral files for both positions, no matter how long the section is. - requirement dropped
  • the position column is missing in the .CSV file - dropped
  • duplication of Detector 2’s background data into Detector 1’s background file
  • Sample scan issue - when using the scanner to enter sample info, the information does not parse out into the correct fields at all
  • In the background window, the histogram is labeled 1-8, while at the bottom of the screen the order is 8-1.  Latter is preferred as it reflects physical detector layout.
  • On sample scan screen, after scanning the label the cursor should automatically move to the manual length entry
  • The sample scan screen should reappear after a completed run similar to the other IMS tracks

Summary

While the NGR software upgrade was much needed, there were several points at which it could have been more streamlined. The process was unnecessarily slow and bulky in some areas that could have been decided on before the software launch (e.g what the filename structure should be and how many sample spectra files should be written). If there was a clear-cut structure (e.g., production and test plans) from the beginning, evaluators could have spent their time more usefully and gotten the software ready earlier. The users are extremely happy with where the software is now, albeit with bugs that remain to be fixed. Although many of the issues that were brought up during testing were quickly resolved, the fact that the IMS software required some hard changes (e.g., position requirement, IMS only writes files for active detectors, and the position column missing from the .CSV file) that were different from the original software was difficult to reconcile throughout the testing process. In the scope of the project this would have been a much easier process had that been understood from the start.

 

The users on board and on shore are happy with the data that has been output since the IMS software has been in commission. The 368X science party also has not had a problem with the data collected on cores from Site 1503A. We continue to monitor the software closely and are aware of all current bugs, the main bug being an occasional incorrect threshold. As the current schedule allows, Bill will make updates to the IMS software and we will hopefully have a fully functional, bug free version by the beginning of X379.