weight_percentage_in_original
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
weight_percentage_in_original [2022/01/19 09:22] – rowlesmr3 | weight_percentage_in_original [2022/11/03 15:08] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Calculating the weight percentages in the original specimen when using an internal standard | ||
+ | |||
+ | When quantifying specimens with an internal standard, TOPAS provides the keywords '' | ||
+ | |||
+ | The following macros calculate those values for you. Furthermore, | ||
+ | |||
+ | |||
+ | ===== To use the macros ===== | ||
+ | |||
+ | These macros should work in TOPAS version 5-7. | ||
+ | |||
+ | **The str which is the standard must be the first str to appear in the xdd** | ||
+ | |||
+ | Potential usages: | ||
+ | |||
+ | The first example has a sample containing 25 wt% standard, that is itself 100% crystalline. The following " | ||
+ | |||
+ | All non-spike phases have the Original_WP macro. After refinement, the values will be updated with their weight percentages in the the original sample. | ||
+ | |||
+ | <code topas> | ||
+ | xdd | ||
+ | str 'This is the first str. It must the standard str.' | ||
+ | Spike_amount_in_specimen(25, | ||
+ | str | ||
+ | Original_WP(0) | ||
+ | str | ||
+ | Original_WP(0) | ||
+ | str | ||
+ | Original_WP(0) | ||
+ | </ | ||
+ | |||
+ | The second example has a sample containing 50 wt% standard, which is itself 90% crystalline. That is, equal weights of standard and sample were mixed together. The analysed specimen contains 5 wt% amorphous material from the standard, in addition to any already present in the sample. | ||
+ | <code topas> | ||
+ | xdd | ||
+ | str 'This is the first str. It must the standard str.' | ||
+ | Spike_amount_in_specimen(50, | ||
+ | str | ||
+ | Original_WP(0) | ||
+ | str | ||
+ | Original_WP(0) | ||
+ | str | ||
+ | Original_WP(0) | ||
+ | </ | ||
+ | |||
+ | |||
+ | ===== The macros ===== | ||
+ | <code topas> | ||
+ | macro Spike_amount_in_specimen(& | ||
+ | { | ||
+ | 'The spike phase str must be the first str in the xdd. This is because of how move_to works' | ||
+ | Spike_amount_in_specimen(std_wt_pct, | ||
+ | } | ||
+ | macro Spike_amount_in_specimen(& | ||
+ | { | ||
+ | 'The spike phase str must be the first str in the xdd. This is because of how move_to works' | ||
+ | move_to xdd | ||
+ | local !whole_specimen_total_std_addition_ = std_wt_pct; | ||
+ | local !whole_specimen_cryst_std_addition_ = std_cryst whole_specimen_total_std_addition_ / 100; | ||
+ | local !original_sample_amorphous_ | ||
+ | move_to str | ||
+ | spiked_phase_measured_weight_percent = whole_specimen_cryst_std_addition_ ; | ||
+ | } | ||
+ | macro Original_WP(result) 'this goes in every non-spike str in the xdd' | ||
+ | { | ||
+ | local orig_wt_ = 100 Get(corrected_weight_percent) / (100 - whole_specimen_total_std_addition_); | ||
+ | existing_prm original_sample_amorphous_ -= orig_wt_; | ||
+ | } | ||
+ | |||
+ | |||
+ | </ | ||
+ | |||
+ | |||