meta data for this page
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
pluginto:calculators [2021/10/26 20:13] – gregbalco | pluginto:calculators [2022/05/03 00:22] (current) – gregbalco | ||
---|---|---|---|
Line 5: | Line 5: | ||
For programmatic use, you most likely want the XML output. Nearly all programming languages have XML parsers that you can use to unpack the XML object and get useful information out of it. | For programmatic use, you most likely want the XML output. Nearly all programming languages have XML parsers that you can use to unpack the XML object and get useful information out of it. | ||
- | The URLs for use of the calculators as a web service are < | + | The URLs for use of the calculators as a web service are < |
- | + | ||
- | This page is incomplete. | + | |
==== Online exposure age calculator for mostly-spallogenic nuclides (not Cl-36) ==== | ==== Online exposure age calculator for mostly-spallogenic nuclides (not Cl-36) ==== | ||
Line 15: | Line 13: | ||
^ Field name ^ Description ^ | ^ Field name ^ Description ^ | ||
|text_block|A text string containing input text in [[http:// | |text_block|A text string containing input text in [[http:// | ||
- | |mlmfile|' | + | |mlmfile|' |
|reportType|' | |reportType|' | ||
|plotFlag|' | |plotFlag|' | ||
Line 341: | Line 339: | ||
The main difference is that each result from a different nuclide concentration measurement is in its own < | The main difference is that each result from a different nuclide concentration measurement is in its own < | ||
- | Also, at the moment this doesn' | + | This only returns results as mass erosion rates with units of g/ |
+ | |||
+ | At the moment this doesn' | ||
Note: there is no erosion rate calculation service for Cl-36. | Note: there is no erosion rate calculation service for Cl-36. | ||
Line 347: | Line 347: | ||
==== Online exposure age calculator for mostly-spallogenic nuclides (not Cl-36), used for production rate calibration ==== | ==== Online exposure age calculator for mostly-spallogenic nuclides (not Cl-36), used for production rate calibration ==== | ||
- | The (non-Cl-36) exposure age calculator can also be used in reverse mode for production rate calibration. | + | The (non-Cl-36) exposure age calculator can also be used in reverse mode for production rate calibration |
- | This requires different input that includes the independent age information. | + | This requires different input that includes the independent age information. Suitable calibration data in the correct input format can be obtained from http:// |
- | This also generates | + | Note: you can only calibrate the production rate for one nuclide at a time. So the input data can only have measurements of one nuclide; otherwise |
- | Example | + | Here is an example |
+ | |||
+ | This is somewhat complicated but if you are familiar with how the exposure age calculators work, and have gotten through all the previous examples, it should be fairly straightforward. | ||
+ | |||
+ | < | ||
+ | % This gets calibration data from the ICE-D: | ||
+ | % calibrated production rate parameters with it, and uses those calibrated | ||
+ | % production rate parameters | ||
+ | % site. | ||
+ | |||
+ | clear all; | ||
+ | |||
+ | % Get some calibration data from the calibration website | ||
+ | |||
+ | cal_page_html = webread(' | ||
+ | |||
+ | % Note: this input data must include data for only one nuclide | ||
+ | |||
+ | % Scrape the formatted text block out of the HTML | ||
+ | startindex = strfind(cal_page_html,'< | ||
+ | endindex = strfind(cal_page_html,'</ | ||
+ | cal_input_text = cal_page_html(startindex: | ||
+ | |||
+ | %% Send that to the online calculator and get calibration results | ||
+ | |||
+ | url = " | ||
+ | cal_xml_result = webread(url,' | ||
+ | |||
+ | % Extract calibration information from XML. This is a stupid regexp | ||
+ | % matching scheme. In MATLAB R2021 you can use the proper XML parser. | ||
+ | |||
+ | % First, get the name of the nuclide -- eventually you will have to send this to the | ||
+ | % calibration code, because you can only do a calibration for one nuclide | ||
+ | % at a time. | ||
+ | |||
+ | temp = regexp(cal_xml_result, | ||
+ | nuclide_string = temp{1}{1}; | ||
+ | |||
+ | % Get calibrated production rate parameters | ||
+ | % Obviously, the below could be shortened by looping over scaling methods | ||
+ | temp = regexp(cal_xml_result, | ||
+ | value_St_string = temp{1}{1}; | ||
+ | temp = regexp(cal_xml_result, | ||
+ | uncert_St_string = temp{1}{1}; | ||
+ | temp = regexp(cal_xml_result, | ||
+ | value_Lm_string = temp{1}{1}; | ||
+ | temp = regexp(cal_xml_result, | ||
+ | uncert_Lm_string = temp{1}{1}; | ||
+ | temp = regexp(cal_xml_result, | ||
+ | value_LSDn_string = temp{1}{1}; | ||
+ | temp = regexp(cal_xml_result, | ||
+ | uncert_LSDn_string = temp{1}{1}; | ||
+ | |||
+ | %% Now we have the production rate parameters obtained from the calibration | ||
+ | % data. | ||
+ | |||
+ | % Get some data from ICE-D: | ||
+ | |||
+ | unknowns_page_html = webread(' | ||
+ | |||
+ | % Get the formatted text out of the HTML | ||
+ | |||
+ | startindex = strfind(unknowns_page_html,'< | ||
+ | endindex = strfind(unknowns_page_html,'</ | ||
+ | unknowns_input_text = unknowns_page_html(startindex: | ||
+ | |||
+ | |||
+ | %% Send sample info to exposure age calculator with additional options to | ||
+ | % force non-default Be-10 production rate | ||
+ | |||
+ | url = " | ||
+ | |||
+ | unknowns_xml_result_calibrated = webread(url,' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | |||
+ | %% Here is what it would look like if we omit the additional calibration | ||
+ | % parameters. In this case we get the results using the normal default | ||
+ | % production rate calibration. | ||
+ | |||
+ | unknowns_xml_result_default = webread(url,' | ||
+ | ' | ||
+ | |||
+ | % We leave it as an exercise for the student to extract the exposure ages | ||
+ | % from unknowns_xml_result_calibrated and unknowns_xml_result_default, | ||
+ | % verify that they are different. | ||
+ | </ | ||