neptoon.products
estimate_sm¶
Classes:
Functions:
- build_base_input_schema
- build_input_schema_koehli
- build_output_schema
- crns_data_frame
- crns_data_frame
- calculate_sm_estimates
- create_uncertainty_bounds
- calculate_uncertainty_of_sm_estimates
- calculate_depth_of_measurement
- calculate_horizontal_footprint
- calculate_all_soil_moisture_data
- return_data_frame
NeutronsToSM ¶
NeutronsToSM(crns_data_frame, n0, dry_soil_bulk_density=1.43, lattice_water=0, soil_organic_carbon=0, additional_gravimetric_water=0, corrected_neutrons_col_name=None, soil_moisture_vol_col_name=None, soil_moisture_grav_col_name=None, depth_column_name=None, radius_column_name=None, conversion_theory='desilets_etal_2010', koehli_parameters='Mar21_mcnp_drf', abs_air_humidity_col_name=str(ABSOLUTE_HUMIDITY), air_pressure_col_name=str(AIR_PRESSURE))
Class for converting a DataFrame containing corrected neutrons into soil moisture estimates. Includes calculations for depth.
Attributes to be added to the class.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
crns_data_frame
|
DataFrame
|
description |
required |
n0
|
float
|
The n0 term |
required |
dry_soil_bulk_density
|
float
|
in g/cm3, by default 1.4 |
1.43
|
lattice_water
|
float
|
in decimal percent, by default 0 |
0
|
soil_organic_carbon
|
float
|
in decimal percent, by default 0 |
0
|
additional_gravimetric_water
|
float
|
Any additional hydrogen pools |
0
|
corrected_neutrons_col_name
|
str
|
column name where corrected neutrons are to be found, by default str( ColumnInfo.Name.CORRECTED_EPI_NEUTRON_COUNT_FINAL ) |
None
|
soil_moisture_vol_col_name
|
str
|
column name where volumetric soil moisture should be written, by default str(ColumnInfo.Name.SOIL_MOISTURE) |
None
|
depth_column_name
|
str
|
column name where depth estimates are written, by default str( ColumnInfo.Name.SOIL_MOISTURE_MEASURMENT_DEPTH ) |
None
|
radius_column_name
|
str
|
column name where radius estimates are written, by default str( ColumnInfo.Name.SOIL_MOISTURE_MEASUREMENT_RADIUS ) |
None
|
calculate_sm_estimates ¶
calculate_sm_estimates(neutron_data_column_name, soil_moisture_column_write_name_grav=None, soil_moisture_column_write_name_vol=None)
Calculates soil moisture estimates and adds them to the dataframe.
This method applies the neutron-to-soil-moisture conversion for each row in the dataframe and stores the results in a new column.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
neutron_data_column_name
|
str
|
The name of the column containing neutron count data. |
required |
soil_moisture_column_write_name_grav
|
str
|
The name of the new column to store calculated gravimetric soil moisture values. |
None
|
soil_moisture_column_write_name_vol
|
str
|
The name of the new column to store calculated volumetric soil moisture values. |
None
|
Returns:
| Type | Description |
|---|---|
None
|
The method modifies the dataframe in-place. |
Notes
This method assumes that the neutron data has been properly corrected and that all necessary parameters (n0, bulk density, etc.) have been set.
create_uncertainty_bounds ¶
Adds the uncertainty to corrected counts to produce upper and lower bounds.
calculate_uncertainty_of_sm_estimates ¶
Produces uncertainty estimates of soil mositure.
calculate_depth_of_measurement ¶
Creates a column with the calculated depth of measurement (cm)
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
radius
|
float
|
The default radius of measurement (avg), by default 50 |
50
|
calculate_horizontal_footprint ¶
Creates a column with the calculated radius of measurement (m).
calculate_all_soil_moisture_data ¶
TODO: Overall process method which will chain together the other methods to produce a fully developed DataFrame.
return_data_frame ¶
Returns the crns DataFrame
Returns:
| Type | Description |
|---|---|
DataFrame
|
The stored DataFrame |
build_base_input_schema ¶
Builds base input schema - ensuring ColumnInfo vars are up to date.
Returns:
| Type | Description |
|---|---|
DataFrameSchema
|
input schema |
build_input_schema_koehli ¶
builds the input schema for data when koehli is used
Returns:
| Type | Description |
|---|---|
DataFrameSchema
|
input koehli schema |
build_output_schema ¶
Builds the output schema at run time - ensures the ColumnInfo.Name vars are up to date.
Returns:
| Type | Description |
|---|---|
DataFrameSchema
|
output schema |