Documentation for fitting
get_data(path=None)
Retrieves the names of all data files in a directory
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
Path to a directory where data files are stored |
None
|
Returns:
Type | Description |
---|---|
list
|
A list of file names |
sample_event(year, mf, sampler='MCMC', production_model='simple_sinusoid', burnin=500, production=1000, params=None, low_bounds=None, up_bounds=None)
Runs a Monte Carlo sampler on some data files.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
year |
float
|
The calender year of the event |
required |
mf |
MultiFitter
|
A compiled MultiFitter |
required |
sampler |
str
|
Monte Carlo sampler. 'MCMC' for Markov Chain Monte Carlo, 'NS' for Nested Sampling. 'MCMC' by default. |
'MCMC'
|
production_model |
str | callable
|
Production rate model. 'simple_sinusoid' by default. |
'simple_sinusoid'
|
burnin |
int
|
Number of burn-in steps for Markov Chain Monte Carlo, 500 by default. |
500
|
production |
int
|
Number of production steps for Markov Chain Monte Carlo, 1000 by default. |
1000
|
params |
ndarray
|
Initial parameters for Monte Carlo samplers. Required when custom production rate model is used. |
None
|
low_bounds |
ndarray
|
Lower bound of params. Required when custom production rate model is used. |
None
|
up_bounds |
ndarray
|
Upper bound of params. Required when custom production rate model is used. |
None
|
Returns:
Type | Description |
---|---|
ndarray
|
Monte Carlo samples |
fit_event(year, path=None, production_model='simple_sinusoid', cbm_model='Guttler15', box='Troposphere', hemisphere='north', sampler=None, burnin=500, production=1000, params=None, low_bounds=None, up_bounds=None, mf=None, oversample=1008, burnin_time=2000, verbose=False)
Fits a Miyake event.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
year |
float
|
The calender year of the event |
required |
mf |
MultiFitter
|
A compiled MultiFitter |
None
|
cbm_model |
str
|
Name of a Carbon Box Model. Must be one in: Miyake17, Brehm21, Guttler15, Buntgen18. |
'Guttler15'
|
oversample |
int
|
Number of samples per year in production. 1008 by default |
1008
|
burnin_time |
int
|
Number of years in the burn-in period. 2000 by default |
2000
|
sampler |
str
|
Monte Carlo sampler. 'MCMC' for Markov Chain Monte Carlo, 'NS' for Nested Sampling. 'MCMC' by default. |
None
|
box |
str
|
Box for calculating d14c. 'Troposphere' by default |
'Troposphere'
|
hemisphere |
str
|
CBM hemisphere. Must be one in: "north", "south". "north" by default |
'north'
|
production_model |
str | callable
|
Production rate model. 'simple_sinusoid' by default. |
'simple_sinusoid'
|
burnin |
int
|
Number of burn-in steps for Markov Chain Monte Carlo, 500 by default. |
500
|
production |
int
|
Number of production steps for Markov Chain Monte Carlo, 1000 by default. |
1000
|
params |
ndarray
|
Initial parameters for Monte Carlo samplers. Required when custom production rate model is used. |
None
|
low_bounds |
ndarray
|
Lower bound of params. Required when custom production rate model is used. |
None
|
up_bounds |
ndarray
|
Upper bound of params. Required when custom production rate model is used. |
None
|
Returns:
Name | Type | Description |
---|---|---|
mf |
MultiFitter
|
A compile MultiFitter object |
chain |
ndrray | NestedSampler object
|
Monte Carlo samples |