Process and standardize carbonate and/or CO2 clumped-isotope analyses,
from low-level data out of a dual-inlet mass spectrometer to final, “absolute”
-Δ47 and Δ48 values with fully propagated analytical error estimates
+Δ47, Δ48 and Δ49 values with fully propagated analytical error estimates
(Daëron, 2021).
The tutorial section takes you through a series of simple steps to import/process data and print out the results.
@@ -893,7 +908,7 @@
4. API Documentation
3 4Process and standardize carbonate and/or CO2 clumped-isotope analyses, 5from low-level data out of a dual-inlet mass spectrometer to final, “absolute”
- 6Δ47 and Δ48 values with fully propagated analytical error estimates
+ 6Δ47, Δ48 and Δ49 values with fully propagated analytical error estimates 7([Daëron, 2021](https://doi.org/10.1029/2020GC009592)). 8 9The **tutorial** section takes you through a series of simple steps to import/process data and print out the results.
@@ -911,8 +926,8 @@
3240 reference frame.32413242 By default equal to (after [Fiebig et al. (2019)](https://doi.org/10.1016/j.chemgeo.2019.05.019),
-3243 Fiebig et al. (in press)):
+3243 [Fiebig et al. (2021)](https://doi.org/10.1016/j.gca.2021.07.012)):32443245 ```py3246 {
@@ -4166,169 +4181,212 @@
4. API Documentation
32763277save_D48_correl.__doc__=D4xdata._save_D4x_correl.__doc__.replace('D4x','D48')3278
-3279class_SessionPlot():
-3280'''
-3281 Simple placeholder class
-3282 '''
-3283def__init__(self):
-3284pass
-3285
-3286_app=typer.Typer(
-3287add_completion=False,
-3288context_settings={'help_option_names':['-h','--help']},
-3289rich_markup_mode='rich',
-3290)
+3279
+3280classD49data(D4xdata):
+3281'''
+3282 Store and process data for a large set of Δ49 analyses,
+3283 usually comprising more than one analytical session.
+3284 '''
+3285
+3286Nominal_D4x={"1000C":0.0,"25C":2.228}# Wang 2004
+3287'''
+3288 Nominal Δ49 values assigned to the Δ49 anchor samples, used by
+3289 `D49data.standardize()` to normalize unknown samples to an absolute Δ49
+3290 reference frame.3291
-3292@_app.command()
-3293def_cli(
-3294rawdata:Annotated[str,typer.Argument(help="Specify the path of a rawdata input file")],
-3295exclude:Annotated[str,typer.Option('--exclude','-e',help='The path of a file specifying UIDs and/or Samples to exclude')]='none',
-3296anchors:Annotated[str,typer.Option('--anchors','-a',help='The path of a file specifying custom anchors')]='none',
-3297output_dir:Annotated[str,typer.Option('--output-dir','-o',help='Specify the output directory')]='output',
-3298run_D48:Annotated[bool,typer.Option('--D48',help='Also standardize D48')]=False,
-3299):
-3300"""
-3301 Process raw D47 data and return standardized results.
-3302
-3303 See [b]https://mdaeron.github.io/D47crunch/#3-command-line-interface-cli[/b] for more details.
-3304
-3305 Reads raw data from an input file, optionally excluding some samples and/or analyses, thean standardizes
-3306 the data based either on the default [b]d13C_VDPB[/b], [b]d18O_VPDB[/b], [b]D47[/b], and [b]D48[/b] anchors or on different
-3307 user-specified anchors. A new directory (named `output` by default) is created to store the results and
-3308 the following sequence is applied:
-3309
-3310 * [b]D47data.wg()[/b]
-3311 * [b]D47data.crunch()[/b]
-3312 * [b]D47data.standardize()[/b]
-3313 * [b]D47data.summary()[/b]
-3314 * [b]D47data.table_of_samples()[/b]
-3315 * [b]D47data.table_of_sessions()[/b]
-3316 * [b]D47data.plot_sessions()[/b]
-3317 * [b]D47data.plot_residuals()[/b]
-3318 * [b]D47data.table_of_analyses()[/b]
-3319 * [b]D47data.plot_distribution_of_analyses()[/b]
-3320 * [b]D47data.plot_bulk_compositions()[/b]
-3321 * [b]D47data.save_D47_correl()[/b]
-3322
-3323 Optionally, also apply similar methods for [b]]D48[/b].
-3324
-3325 [b]Example CSV file for --anchors option:[/b]
-3326 [i]
-3327 Sample, d13C_VPDB, d18O_VPDB, D47, D48
-3328 ETH-1, 2.02, -2.19, 0.2052, 0.138
-3329 ETH-2, -10.17, -18.69, 0.2085, 0.138
-3330 ETH-3, 1.71, -1.78, 0.6132, 0.270
-3331 ETH-4, , , 0.4511, 0.223
-3332 [/i]
-3333 Except for [i]Sample[/i], none of the columns above are mandatory.
+3292 By default equal to (after [Wang et al. (2004)](https://doi.org/10.1016/j.gca.2004.05.039)):
+3293
+3294 ```py
+3295 {
+3296 "1000C": 0.0,
+3297 "25C": 2.228
+3298 }
+3299 ```
+3300 '''
+3301
+3302@property
+3303defNominal_D49(self):
+3304returnself.Nominal_D4x
+3305
+3306@Nominal_D49.setter
+3307defNominal_D49(self,new):
+3308self.Nominal_D4x=dict(**new)
+3309self.refresh()
+3310
+3311def__init__(self,l=[],**kwargs):
+3312'''
+3313 **Parameters:** same as `D4xdata.__init__()`
+3314 '''
+3315D4xdata.__init__(self,l=l,mass='49',**kwargs)
+3316
+3317defsave_D49_correl(self,*args,**kwargs):
+3318returnself._save_D4x_correl(*args,**kwargs)
+3319
+3320save_D49_correl.__doc__=D4xdata._save_D4x_correl.__doc__.replace('D4x','D49')
+3321
+3322class_SessionPlot():
+3323'''
+3324 Simple placeholder class
+3325 '''
+3326def__init__(self):
+3327pass
+3328
+3329_app=typer.Typer(
+3330add_completion=False,
+3331context_settings={'help_option_names':['-h','--help']},
+3332rich_markup_mode='rich',
+3333)3334
-3335 [b]Example CSV file for --exclude option:[/b]
-3336 [i]
-3337 Sample, UID
-3338 FOO-1,
-3339 BAR-2,
-3340 , A04
-3341 , A17
-3342 , A88
-3343 [/i]
-3344 This will exclude all analyses of samples [i]FOO-1[/i] and [i]BAR-2[/i],
-3345 and the analyses with UIDs [i]A04[/i], [i]A17[/i], and [i]A88[/i].
-3346 Neither column is mandatory.
-3347 """
-3348
-3349data=D47data()
-3350data.read(rawdata)
-3351
-3352ifexclude!='none':
-3353exclude=read_csv(exclude)
-3354exclude_uid={r['UID']forrinexcludeif'UID'inr}
-3355exclude_sample={r['Sample']forrinexcludeif'Sample'inr}
-3356else:
-3357exclude_uid=[]
-3358exclude_sample=[]
-3359
-3360data=D47data([rforrindataifr['UID']notinexclude_uidandr['Sample']notinexclude_sample])
-3361
-3362ifanchors!='none':
-3363anchors=read_csv(anchors)
-3364iflen([_for_inanchorsif'd13C_VPDB'in_]):
-3365data.Nominal_d13C_VPDB={
-3366_['Sample']:_['d13C_VPDB']
-3367for_inanchors
-3368if'd13C_VPDB'in_
-3369}
-3370iflen([_for_inanchorsif'd18O_VPDB'in_]):
-3371data.Nominal_d18O_VPDB={
-3372_['Sample']:_['d18O_VPDB']
-3373for_inanchors
-3374if'd18O_VPDB'in_
-3375}
-3376iflen([_for_inanchorsif'D47'in_]):
-3377data.Nominal_D4x={
-3378_['Sample']:_['D47']
-3379for_inanchors
-3380if'D47'in_
-3381}
-3382
-3383data.refresh()
-3384data.wg()
-3385data.crunch()
-3386data.standardize()
-3387data.summary(dir=output_dir)
-3388data.plot_residuals(dir=output_dir,filename='D47_residuals.pdf',kde=True)
-3389data.plot_bulk_compositions(dir=output_dir+'/bulk_compositions')
-3390data.plot_sessions(dir=output_dir)
-3391data.save_D47_correl(dir=output_dir)
-3392
-3393ifnotrun_D48:
-3394data.table_of_samples(dir=output_dir)
-3395data.table_of_analyses(dir=output_dir)
-3396data.table_of_sessions(dir=output_dir)
-3397
-3398
-3399ifrun_D48:
-3400data2=D48data()
-3401print(rawdata)
-3402data2.read(rawdata)
-3403
-3404data2=D48data([rforrindata2ifr['UID']notinexclude_uidandr['Sample']notinexclude_sample])
-3405
-3406ifanchors!='none':
-3407iflen([_for_inanchorsif'd13C_VPDB'in_]):
-3408data2.Nominal_d13C_VPDB={
-3409_['Sample']:_['d13C_VPDB']
-3410for_inanchors
-3411if'd13C_VPDB'in_
-3412}
-3413iflen([_for_inanchorsif'd18O_VPDB'in_]):
-3414data2.Nominal_d18O_VPDB={
-3415_['Sample']:_['d18O_VPDB']
-3416for_inanchors
-3417if'd18O_VPDB'in_
-3418}
-3419iflen([_for_inanchorsif'D48'in_]):
-3420data2.Nominal_D4x={
-3421_['Sample']:_['D48']
-3422for_inanchors
-3423if'D48'in_
-3424}
+3335@_app.command()
+3336def_cli(
+3337rawdata:Annotated[str,typer.Argument(help="Specify the path of a rawdata input file")],
+3338exclude:Annotated[str,typer.Option('--exclude','-e',help='The path of a file specifying UIDs and/or Samples to exclude')]='none',
+3339anchors:Annotated[str,typer.Option('--anchors','-a',help='The path of a file specifying custom anchors')]='none',
+3340output_dir:Annotated[str,typer.Option('--output-dir','-o',help='Specify the output directory')]='output',
+3341run_D48:Annotated[bool,typer.Option('--D48',help='Also standardize D48')]=False,
+3342):
+3343"""
+3344 Process raw D47 data and return standardized results.
+3345
+3346 See [b]https://mdaeron.github.io/D47crunch/#3-command-line-interface-cli[/b] for more details.
+3347
+3348 Reads raw data from an input file, optionally excluding some samples and/or analyses, thean standardizes
+3349 the data based either on the default [b]d13C_VDPB[/b], [b]d18O_VPDB[/b], [b]D47[/b], and [b]D48[/b] anchors or on different
+3350 user-specified anchors. A new directory (named `output` by default) is created to store the results and
+3351 the following sequence is applied:
+3352
+3353 * [b]D47data.wg()[/b]
+3354 * [b]D47data.crunch()[/b]
+3355 * [b]D47data.standardize()[/b]
+3356 * [b]D47data.summary()[/b]
+3357 * [b]D47data.table_of_samples()[/b]
+3358 * [b]D47data.table_of_sessions()[/b]
+3359 * [b]D47data.plot_sessions()[/b]
+3360 * [b]D47data.plot_residuals()[/b]
+3361 * [b]D47data.table_of_analyses()[/b]
+3362 * [b]D47data.plot_distribution_of_analyses()[/b]
+3363 * [b]D47data.plot_bulk_compositions()[/b]
+3364 * [b]D47data.save_D47_correl()[/b]
+3365
+3366 Optionally, also apply similar methods for [b]]D48[/b].
+3367
+3368 [b]Example CSV file for --anchors option:[/b]
+3369 [i]
+3370 Sample, d13C_VPDB, d18O_VPDB, D47, D48
+3371 ETH-1, 2.02, -2.19, 0.2052, 0.138
+3372 ETH-2, -10.17, -18.69, 0.2085, 0.138
+3373 ETH-3, 1.71, -1.78, 0.6132, 0.270
+3374 ETH-4, , , 0.4511, 0.223
+3375 [/i]
+3376 Except for [i]Sample[/i], none of the columns above are mandatory.
+3377
+3378 [b]Example CSV file for --exclude option:[/b]
+3379 [i]
+3380 Sample, UID
+3381 FOO-1,
+3382 BAR-2,
+3383 , A04
+3384 , A17
+3385 , A88
+3386 [/i]
+3387 This will exclude all analyses of samples [i]FOO-1[/i] and [i]BAR-2[/i],
+3388 and the analyses with UIDs [i]A04[/i], [i]A17[/i], and [i]A88[/i].
+3389 Neither column is mandatory.
+3390 """
+3391
+3392data=D47data()
+3393data.read(rawdata)
+3394
+3395ifexclude!='none':
+3396exclude=read_csv(exclude)
+3397exclude_uid={r['UID']forrinexcludeif'UID'inr}
+3398exclude_sample={r['Sample']forrinexcludeif'Sample'inr}
+3399else:
+3400exclude_uid=[]
+3401exclude_sample=[]
+3402
+3403data=D47data([rforrindataifr['UID']notinexclude_uidandr['Sample']notinexclude_sample])
+3404
+3405ifanchors!='none':
+3406anchors=read_csv(anchors)
+3407iflen([_for_inanchorsif'd13C_VPDB'in_]):
+3408data.Nominal_d13C_VPDB={
+3409_['Sample']:_['d13C_VPDB']
+3410for_inanchors
+3411if'd13C_VPDB'in_
+3412}
+3413iflen([_for_inanchorsif'd18O_VPDB'in_]):
+3414data.Nominal_d18O_VPDB={
+3415_['Sample']:_['d18O_VPDB']
+3416for_inanchors
+3417if'd18O_VPDB'in_
+3418}
+3419iflen([_for_inanchorsif'D47'in_]):
+3420data.Nominal_D4x={
+3421_['Sample']:_['D47']
+3422for_inanchors
+3423if'D47'in_
+3424}3425
-3426data2.refresh()
-3427data2.wg()
-3428data2.crunch()
-3429data2.standardize()
-3430data2.summary(dir=output_dir)
-3431data2.plot_sessions(dir=output_dir)
-3432data2.plot_residuals(dir=output_dir,filename='D48_residuals.pdf',kde=True)
-3433data2.plot_distribution_of_analyses(dir=output_dir)
-3434data2.save_D48_correl(dir=output_dir)
-3435
-3436table_of_analyses(data,data2,dir=output_dir)
-3437table_of_samples(data,data2,dir=output_dir)
-3438table_of_sessions(data,data2,dir=output_dir)
-3439
-3440def__cli():
-3441_app()
+3426data.refresh()
+3427data.wg()
+3428data.crunch()
+3429data.standardize()
+3430data.summary(dir=output_dir)
+3431data.plot_residuals(dir=output_dir,filename='D47_residuals.pdf',kde=True)
+3432data.plot_bulk_compositions(dir=output_dir+'/bulk_compositions')
+3433data.plot_sessions(dir=output_dir)
+3434data.save_D47_correl(dir=output_dir)
+3435
+3436ifnotrun_D48:
+3437data.table_of_samples(dir=output_dir)
+3438data.table_of_analyses(dir=output_dir)
+3439data.table_of_sessions(dir=output_dir)
+3440
+3441
+3442ifrun_D48:
+3443data2=D48data()
+3444print(rawdata)
+3445data2.read(rawdata)
+3446
+3447data2=D48data([rforrindata2ifr['UID']notinexclude_uidandr['Sample']notinexclude_sample])
+3448
+3449ifanchors!='none':
+3450iflen([_for_inanchorsif'd13C_VPDB'in_]):
+3451data2.Nominal_d13C_VPDB={
+3452_['Sample']:_['d13C_VPDB']
+3453for_inanchors
+3454if'd13C_VPDB'in_
+3455}
+3456iflen([_for_inanchorsif'd18O_VPDB'in_]):
+3457data2.Nominal_d18O_VPDB={
+3458_['Sample']:_['d18O_VPDB']
+3459for_inanchors
+3460if'd18O_VPDB'in_
+3461}
+3462iflen([_for_inanchorsif'D48'in_]):
+3463data2.Nominal_D4x={
+3464_['Sample']:_['D48']
+3465for_inanchors
+3466if'D48'in_
+3467}
+3468
+3469data2.refresh()
+3470data2.wg()
+3471data2.crunch()
+3472data2.standardize()
+3473data2.summary(dir=output_dir)
+3474data2.plot_sessions(dir=output_dir)
+3475data2.plot_residuals(dir=output_dir,filename='D48_residuals.pdf',kde=True)
+3476data2.plot_distribution_of_analyses(dir=output_dir)
+3477data2.save_D48_correl(dir=output_dir)
+3478
+3479table_of_analyses(data,data2,dir=output_dir)
+3480table_of_samples(data,data2,dir=output_dir)
+3481table_of_sessions(data,data2,dir=output_dir)
+3482
+3483def__cli():
+3484_app()
@@ -5242,66 +5300,66 @@
3241 reference frame.32423243 By default equal to (after [Fiebig et al. (2019)](https://doi.org/10.1016/j.chemgeo.2019.05.019),
-3244 Fiebig et al. (in press)):
+3244 [Fiebig et al. (2021)](https://doi.org/10.1016/j.gca.2021.07.012)):32453246 ```py3247 {
@@ -11940,7 +11998,7 @@
3281classD49data(D4xdata):
+3282'''
+3283 Store and process data for a large set of Δ49 analyses,
+3284 usually comprising more than one analytical session.
+3285 '''
+3286
+3287Nominal_D4x={"1000C":0.0,"25C":2.228}# Wang 2004
+3288'''
+3289 Nominal Δ49 values assigned to the Δ49 anchor samples, used by
+3290 `D49data.standardize()` to normalize unknown samples to an absolute Δ49
+3291 reference frame.
+3292
+3293 By default equal to (after [Wang et al. (2004)](https://doi.org/10.1016/j.gca.2004.05.039)):
+3294
+3295 ```py
+3296 {
+3297 "1000C": 0.0,
+3298 "25C": 2.228
+3299 }
+3300 ```
+3301 '''
+3302
+3303@property
+3304defNominal_D49(self):
+3305returnself.Nominal_D4x
+3306
+3307@Nominal_D49.setter
+3308defNominal_D49(self,new):
+3309self.Nominal_D4x=dict(**new)
+3310self.refresh()
+3311
+3312def__init__(self,l=[],**kwargs):
+3313'''
+3314 **Parameters:** same as `D4xdata.__init__()`
+3315 '''
+3316D4xdata.__init__(self,l=l,mass='49',**kwargs)
+3317
+3318defsave_D49_correl(self,*args,**kwargs):
+3319returnself._save_D4x_correl(*args,**kwargs)
+3320
+3321save_D49_correl.__doc__=D4xdata._save_D4x_correl.__doc__.replace('D4x','D49')
+
+
+
+
Store and process data for a large set of Δ49 analyses,
+usually comprising more than one analytical session.
+
+
+
+
+
+
+
+ D49data(l=[], **kwargs)
+
+
+
+
+
+
3312def__init__(self,l=[],**kwargs):
+3313'''
+3314 **Parameters:** same as `D4xdata.__init__()`
+3315 '''
+3316D4xdata.__init__(self,l=l,mass='49',**kwargs)
+
Nominal Δ49 values assigned to the Δ49 anchor samples, used by
+D49data.standardize() to normalize unknown samples to an absolute Δ49
+reference frame.