API reference
LaserTRAM
The class LaserTRAM
which is devoted to the "time resolved analysis"
operations during the laser data reduction process. To be used in
conjunction with the LaserCalc
class. The general idea is that
this creates an object that contains all the information related
to one individual spot analysis.
Source code in lasertram\tram\tram.py
51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 |
|
__init__(name)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name |
str
|
your sample name i.e. the value in the |
required |
Source code in lasertram\tram\tram.py
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 |
|
assign_int_std(int_std)
assigns the spot an internal standard analyte
Parameters:
Name | Type | Description | Default |
---|---|---|---|
int_std |
str
|
the name of the column for the internal standard analyte e.g., "29Si" |
required |
Source code in lasertram\tram\tram.py
204 205 206 207 208 209 210 211 212 213 214 215 216 |
|
assign_intervals(bkgd, keep, omit=None)
assigns the intervals to be used as background as well as the portion of the ablation interval to be used in calculating concentrations
Parameters:
Name | Type | Description | Default |
---|---|---|---|
bkgd |
tuple
|
(start, stop) pair of values corresponding to the analysis time where the background signal starts and stops |
required |
keep |
tuple
|
(start, stop) pair of values correpsonding to the analysis time where the interval signal for concentrations starts and stops |
required |
omit |
tuple
|
(start, stop) pair of values corresponding to the analysis time to be omitted from the |
None
|
Source code in lasertram\tram\tram.py
218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 |
|
despike_data(analyte_list='all', std_devs=4, window=25)
despike counts per second normalized to an internal standard using a z score filter
Parameters
analyte_list : str, optional list of analytes to despike. Accepts singular analytes e.g., "29Si" or numerous e.g., ["7Li", "29Si"]. by default "all" std_devs : int, optional number of standard deviations from the mean to be considered an outlier, by default 3 window : int, optional size of the window to be used in the moving average, by default 50
Source code in lasertram\tram\tram.py
408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 |
|
get_bkgd_data()
uses the intervals assigned in assign_intervals
to take the median
value of all analytes within that range and use them as the
background signal that gets subtracted from the ablation signal
Source code in lasertram\tram\tram.py
257 258 259 260 261 262 263 264 265 266 |
|
get_data(df, time_units='ms')
assigns raw counts/sec data to the object
Parameters:
Name | Type | Description | Default |
---|---|---|---|
df |
pandas DataFrame
|
raw data corresponding to the spot being processed i.e., |
required |
time_units |
str
|
string denoting the units for the |
'ms'
|
Source code in lasertram\tram\tram.py
178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 |
|
get_detection_limits()
Calculates detection limits in counts per second for each analyte. This is defined as the value that is three standard deviations away from the background.
Source code in lasertram\tram\tram.py
268 269 270 271 272 273 274 275 276 277 278 279 |
|
make_output_report()
create an output report for the spot processing. This is a pandas DataFrame that has the following format:
timestamp | Spot | despiked | omitted_region | bkgd_start | bkgd_stop | int_start | int_stop | norm | norm_cps | analyte vals and uncertainties --> |
---|---|---|---|---|---|---|---|---|---|---|
Source code in lasertram\tram\tram.py
342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 |
|
normalize_interval()
normalize the analytes from the "keep" portion of the signal the internal standard analyte. This is done by simply dividing the analytes by the internal standard analyte.
This also calculates the median normalized value, its standard error of the mean, and relative standard error of the mean.
Source code in lasertram\tram\tram.py
292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 |
|
subtract_bkgd()
subtract the median background values calculated in get_bkgd_data
from the signal in the "keep" interval established in assign_intervals
Source code in lasertram\tram\tram.py
281 282 283 284 285 286 287 288 289 290 |
|
LaserCalc
The class LaserCalc
which is devoted to calculating
concentrations for laser ablation ICP-MS spot or
line of spots data following the methodology of
Longerich et al., (1996) and Kent and Ungerer (2006). It should be used in conjunction
with the output from LaserTRAM
class. The basic steps are as follows:
- upload SRM data
- upload
LaserTRAM
output - set the calibration standard
- set the internal standard concentrations for the unknowns
- calculate the concentrations and uncertainties of all analyses
References
- Longerich, H. P., Jackson, S. E., & Günther, D. (1996). Inter-laboratory note. Laser ablation inductively coupled plasma mass spectrometric transient signal data acquisition and analyte concentration calculation. Journal of analytical atomic spectrometry, 11(9), 899-904.
- Kent, A. J., & Ungerer, C. A. (2006). Analysis of light lithophile elements (Li, Be, B) by laser ablation ICP-MS: comparison between magnetic sector and quadrupole ICP-MS. American Mineralogist, 91(8-9), 1401-1411.
Source code in lasertram\calc\calc.py
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 |
|
__init__(name)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name |
str
|
The name of the experiment to be processed |
required |
Source code in lasertram\calc\calc.py
51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 |
|
calculate_concentrations()
Calculates the concentration and uncertainty of all spots in the experiment using the user specified calibration standard and internal standard concentrations/uncertainties.
Source code in lasertram\calc\calc.py
450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 |
|
calculate_uncertainties()
Calculate the uncertainties for each analysis.
Source code in lasertram\calc\calc.py
657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 |
|
drift_check(pval=0.01)
For each analyte in the experiment, perform a linear regression to
assess whether or not drift in the mass spectrometer is happening at a
significant level. Significance is determined by setting the pval
threshold.
If the regression is statistically significant, it gets flagged for later
correct treatment in calculate_concentrations
Parameters
pval : float, optional significance threshold to reject the null hypothesis for drift correction, by default 0.01
Source code in lasertram\calc\calc.py
297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 |
|
get_SRM_comps(df)
load in a database of standard reference material compositions
Parameters:
Name | Type | Description | Default |
---|---|---|---|
df |
pandas DataFrame
|
pandas DataFrame of standard reference materials |
required |
where each row represents data for a standard reference material. The first column should be named "Standard". All other columns are for different elemental concentrations.Standard names must be exact names found in GEOREM: http://georem.mpch-mainz.gwdg.de/sample_query_pref.asp
Source code in lasertram\calc\calc.py
175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 |
|
get_calibration_std_ratios()
For the calibration standard, calculate the concentration ratio between every analyte and the internal standard.
Source code in lasertram\calc\calc.py
393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 |
|
get_data(df)
load in output from LaserTRAM
for calculation of concentrations
Parameters:
Name | Type | Description | Default |
---|---|---|---|
df |
pandas DataFrame
|
a 2D pandas DataFrame representing numerous concatenated calls to |
required |
Source code in lasertram\calc\calc.py
199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 |
|
get_secondary_standard_accuracies()
calculate the accuracy of each secondary standard where accuracy is 100 * measured / accepted value
Here accepted
value is the GEOREM preferred value for that SRM analyte pair.
Source code in lasertram\calc\calc.py
862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 |
|
set_calibration_standard(std)
Assign which standard reference material will be the calibration standard for calculating concentrations.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
std |
str
|
name of standard reference material (e.g., |
required |
Source code in lasertram\calc\calc.py
272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 |
|
set_int_std_concentrations(spots=None, concentrations=None, uncertainties=None)
Assign the concentration and uncertainty of the internal standard analyte to a series of spots.
Briefly...a linear change in the concentration value reflects a linear change in the calculated concentration.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
spots |
pandas Series
|
pandas series containing the names of the spots tohave their internal standard concentration-uncertainty assigned. This is the |
None
|
concentrations |
array - like
|
values representing the internal standard concentration. Must be the same shape as |
None
|
uncertainties |
array - like
|
values representing the internal standard relative uncertainty in percent. Must be the same shape as |
None
|
Source code in lasertram\calc\calc.py
414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 |
|
batch module: For batch processing operations in laserTRAM
process_spot(spot, raw_data, bkgd, keep, int_std, omit=None, despike=False, output_report=True)
a function to incorporate all the methods of the LaserTRAM
class
so a spot can be processed in an efficient and compact way.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
spot |
LaserTRAM spot object
|
an empty |
required |
raw_data |
pandas DataFrame
|
the raw counts per second dataframe to be assigned to the spot. Shape is (m x n) where m is the number of cycles through the mass range |
required |
bkgd |
tuple
|
(start, stop) pair of values corresponding to the analysis time where the background signal starts and stops |
required |
keep |
tuple
|
(start, stop) pair of values correpsonding to the analysis time where the interval signal for concentrations starts and stops |
required |
int_std |
str
|
column name for the internal standard analyte (e.g., 29Si) |
required |
omit |
tuple
|
(start, stop) pair of values corresponding to the analysis time to be omitted from the |
None
|
despike |
bool
|
Whether or not to despike all analyte signals using the standard deviation filter from |
False
|
output_report |
bool
|
Whether or not to create a 1-row pandas DataFrame output report in the following format. Defaults to True. |
True
|
Source code in lasertram\helpers\batch.py
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
|
conversions module: For converting wt% oxide to ppm
oxide_to_ppm(wt_percent, int_std)
convert concentration internal standard analyte oxide in weight percent to concentration ppm for a 1D series of data
Args: wt_percent (array-like): the oxide values to be converted to ppm int_std (str): the internal standard used in the experiment (e.g., '29Si', '43Ca','47Ti')
Returns: ppm (array-like): concentrations in ppm the same shape as the wt_percent input
Source code in lasertram\helpers\conversions.py
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 |
|
plot_lasertram_uncertainties(spot, fig=None, ax=None, **kwargs)
plot a bar chart of analyte uncertainties related to the output from
processing using the LaserTRAM
module
Parameters
spot : LaserTRAM.spot
the LaserTRAM.spot
object to plot the uncertainties for
fig : matplotlib.Figure, optional
The figure to apply the plot to, by default None
ax : matplotlib.Axes, optional
the axis to apply the plot to, by default None
Returns
ax
Source code in lasertram\helpers\plotting.py
122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 |
|
plot_timeseries_data(df, analytes='all', marker='', fig=None, ax=None, **kwargs)
Plot time-series data related to laser ablation ICP-MS analyses, typically where the x-axis is analysis time and y-axis is either counts per second data or data derived from it.
Parameters
df : pandas DataFrame the dataframe to be plotted analytes : str, optional list of columns to be plotted from the dataframe, by default 'all'. Meant to be utilized when the input dataframe is either a LaserTRAM spot object so columns reflect only 'Time' and analytes. marker : str, optional matplotlib marker to use for plotting symbol, by default '' fig : matplotlib.Figure, optional The figure to apply the plot to, by default None ax : matplotlib.Axes, optional the axis to apply the plot to, by default None
Returns
ax
Ex:
from lasertram import preprocessing, plotting, LaserTRAM
import matplotlib.pyplot as plt
plt.style.use("lasertram.lasertram")
raw_data = preprocessing.load_test_rawdata()
sample = 'GSD-1G_-_1'
ax = plotting.plot_timeseries_data(raw_data.loc[sample,:])
ax[0].set_title(sample)
ax[0].set_ylabel("cps")
ax[0].set_xlabel("Time (ms)")
Source code in lasertram\helpers\plotting.py
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 |
|
extract_agilent_data(file)
read raw output from an Agilent quadrupole .csv file and return a pandas dataframe and metadata ready for processing with LaserTRAM
Parameters
file : path-like path to the csv file for data to be extracted
Returns
dict dictionary that contains timestamp, filename, and data for preprocessing
Source code in lasertram\helpers\preprocessing.py
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
|
extract_thermo_data(file)
read raw output from an ThermoFisher quadrupole .csv file and return a pandas dataframe and metadata ready for processing with LaserTRAM
Parameters
file : path-like path to the csv file for data to be extracted
Returns
dict dictionary that contains timestamp, filename, and data for preprocessing
Source code in lasertram\helpers\preprocessing.py
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 |
|
load_test_int_std_comps()
Load in internal standard comps used as examples in the following manuscript:
Lubbers, J., Kent, A., Russo, C. (2025) "lasertram: a Python library for time resolved analysis of laser ablation inductively coupled plasma mass spectrometry data "
Source code in lasertram\helpers\preprocessing.py
265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 |
|
load_test_intervals()
Load in interval regions used as examples in the following manuscript:
Lubbers, J., Kent, A., Russo, C. (2025) "lasertram: a Python library for time resolved analysis of laser ablation inductively coupled plasma mass spectrometry data "
Source code in lasertram\helpers\preprocessing.py
243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 |
|
load_test_rawdata()
Load in raw data used as examples in the following manuscript:
Lubbers, J., Kent, A., Russo, C. (2025) "lasertram: a Python library for time resolved analysis of laser ablation inductively coupled plasma mass spectrometry data "
Source code in lasertram\helpers\preprocessing.py
221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 |
|
make_lt_ready_file(file, quad_type)
Take an individual csv file from either an Agilent or ThermoFisher quadrupole mass spectrometer and convert it to a pandas.DataFrame object ready for processing in LaserTRAM
Parameters
folder : path-like path to the csv file. quad_type : str "agilent" or "thermo"
Returns
pandas.DataFrame dataframe ready to be processed using LaserTRAM.
Source code in lasertram\helpers\preprocessing.py
176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 |
|
make_lt_ready_folder(folder, quad_type)
Take a folder of csv files from either an Agilent or ThermoFisher quadrupole mass spectrometer, and combine their data such that it is a pandas.DataFrame ready for processing in LaserTRAM
Parameters
folder : path-like path to the folder where the csv files are. This looks at all csv files so make sure ONLY the data are in there. quad_type : str "agilent" or "thermo"
Returns
pandas.DataFrame dataframe ready to be processed using LaserTRAM.
Source code in lasertram\helpers\preprocessing.py
113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 |
|