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 19:58] – 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 http:// | + | The URLs for use of the calculators as a web service are < |
- | This page is incomplete. | + | ==== Online exposure age calculator for mostly-spallogenic nuclides |
- | + | ||
- | ==== Online exposure age calculator for mostly-spallogenic nuclides ==== | + | |
The normal version of the online exposure age calculator computes exposure ages for He-3 in pyroxene or olivine as well as He-3, Be-10, C-14, Ne-21, and Al-26 in quartz. The fields that can be attached to an HTTP request to this calculator are as follows: | The normal version of the online exposure age calculator computes exposure ages for He-3 in pyroxene or olivine as well as He-3, Be-10, C-14, Ne-21, and Al-26 in quartz. The fields that can be attached to an HTTP request to this calculator are as follows: | ||
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 271: | Line 269: | ||
|summary|' | |summary|' | ||
- | The main difference in output is that you will get different plots. Otherwise the structure of the SML is similar. | + | The main difference in output is that you will get different plots. Otherwise the structure of the XML is similar. |
Note: this is only installed on stoneage.ice-d.org. It is not installed on hess.ess.washington.edu, | Note: this is only installed on stoneage.ice-d.org. It is not installed on hess.ess.washington.edu, | ||
- | ==== Online erosion rate calculator for mostly-spallogenic nuclides ===== | + | ==== Online erosion rate calculator for mostly-spallogenic nuclides |
- | Again, this is structured quite similarly | + | Again, this is similar |
- | Differences | + | ^ Field name ^ Description ^ |
+ | |text_block|A text string containing input text in valid v3 calculator input form. Note that this input format is the same for both exposure age and erosion rate calculations.| | ||
+ | |mlmfile|' | ||
+ | |reportType|' | ||
+ | |resultType|' | ||
+ | |plotFlag|' | ||
- | Example | + | The XML output for erosion rate results is slightly different from the output for exposure-age results. If you send in the same example data from above: |
- | ==== Online exposure age calculator for mostly-spallogenic nuclides used for production rate calibration ==== | + | < |
+ | PH-1 41.3567 -70.7348 91 std 4.5 2.65 1 0.00008 1999; | ||
+ | PH-1 Be-10 quartz 123453 3717 KNSTD; | ||
+ | PH-1 Al-26 quartz 712408 31238 KNSTD; | ||
+ | </ | ||
- | The (non-Cl-36) exposure age calculator can also be used in reverse mode for production rate calibration. | + | The XML result is as follows: |
- | This requires different input that includes the independent age information. | ||
- | This also generates different output. | + | < |
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | </ | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
- | Example | + | The main difference is that each result from a different nuclide concentration measurement is in its own < |
+ | |||
+ | 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. | ||
+ | |||
+ | ==== 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 by setting the mlmfile field to ' | ||
+ | |||
+ | This requires different input that includes the independent age information. Suitable calibration data in the correct input format can be obtained | ||
+ | |||
+ | 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 generates an error. | ||
+ | |||
+ | Here is an example in MATLAB that (i) scrapes calibration data in the appropriate input form from the ICE-D: | ||
+ | |||
+ | This is somewhat complicated but if you are familiar with how the exposure age calculators work, and have gotten through all the previous examples, | ||
+ | |||
+ | < | ||
+ | % 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. | ||
+ | </ | ||