correldata
Dataframe-like tables of data with correlated uncertainties
These data are stored in a dictionary, whose values are numpy arrays with elements which may be strings, floats, or floats with associated uncertainties as defined in the uncertainties library.
When reading data from a csv file, column names are interpreted in the following way:
Column names are interpreted in the following way:
- In most cases, each columns is converted to a dict value, with the corresponding dict key being the column's label.
- Columns whose label starts with
SEare interpreted as specifying the standard error for the latest preceding data column. - Columns whose label starts with
correlare interpreted as specifying the correlation matrix for the latest preceding data column. In that case, column labels are ignored for the rest of the columns belonging to this matrix. - Columns whose label starts with
covarare interpreted as specifying the covariance matrix for the latest preceding data column. In that case, column labels are ignored for the rest of the columns belonging to this matrix. SE,correl, andcovarmay be specified for any arbitrary variable other than the latest preceding data column, by adding an underscore followed by the variable's label (ex:SE_foo,correl_bar,covar_baz).correl, andcovarmay also be specified for any pair of variable, by adding an underscore followed by the two variable labels, joined by a second underscore (ex:correl_foo_bar,covar_X_Y). The elements of the first and second variables correspond, respectively, to the lines and columns of this matrix.
Example
import correldata
data = '''
Sample, Tacid, D47, SE, correl,,, D48, covar,,, correl_D47_D48
FOO, 90., .245, .005, 1, 0.5, 0.5, .145, 4e-4, 1e-4, 1e-4, 0.5, 0, 0
BAR, 90., .246, .005, 0.5, 1, 0.5, .146, 1e-4, 4e-4, 1e-4, 0, 0.5, 0
BAZ, 90., .247, .005, 0.5, 0.5, 1, .147, 1e-4, 1e-4, 4e-4, 0, 0, 0.5
'''[1:-1]
cdata = correldata.read_str(data)
print(cdata)
yields:
{
'Sample': array(['FOO', 'BAR', 'BAZ'], dtype='<U3'),
'Tacid': array([90., 90., 90.]),
'D47': uarray([0.245+/-0.005, 0.246+/-0.005, 0.247+/-0.005], dtype=object),
'D48': uarray([0.145+/-0.02, 0.146+/-0.02, 0.147+/-0.02], dtype=object)
}
and
print(cdata.str(correl_format = '.2f'))
yields:
Sample, Tacid, D47, SE_D47, correl_D47, , , D48, SE_D48, correl_D48, , , correl_D47_D48, ,
FOO, 90, 0.245, 0.005, 1.00, 0.50, 0.50, 0.145, 0.02, 1.00, 0.25, 0.25, 0.50, -0.00, -0.00
BAR, 90, 0.246, 0.005, 0.50, 1.00, 0.50, 0.146, 0.02, 0.25, 1.00, 0.25, 0.00, 0.50, -0.00
BAZ, 90, 0.247, 0.005, 0.50, 0.50, 1.00, 0.147, 0.02, 0.25, 0.25, 1.00, -0.00, 0.00, 0.50
Documentation
Metadata
Release files for correldata 2.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| correldata-2.0.4.tar.gz | 10.1 kB | Without provenance | Details for correldata-2.0.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| correldata-2.0.4-py3-none-any.whl | Python 3 | none | any | Details for correldata-2.0.4-py3-none-any.whl |
Total release size: 21.5 kB
Release files / correldata-2.0.4.tar.gz
| Download URL | correldata-2.0.4.tar.gz |
|---|---|
| Size | 10.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0bf78e11a7437ee4f27baeda2140b580ba01d6af0457738c9c6b592287b50ea3
|
|
BLAKE2b-256 checksum How to use checksums |
c717380436e3663307b090ef8be5900a8679517daee67c37ff4abe290c2bd87b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.21 {"installer":{"name":"uv","version":"0.9.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / correldata-2.0.4-py3-none-any.whl
| Download URL | correldata-2.0.4-py3-none-any.whl |
|---|---|
| Size | 11.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9a439e9e88adee61bb80c2c7d9d1092630df5a57fa12b927d630eb9b5b5979a8
|
|
BLAKE2b-256 checksum How to use checksums |
decf395cdefc545eee1f449a879e68b51ec09e1ed080a11c390087d07312fa0b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.21 {"installer":{"name":"uv","version":"0.9.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for correldata 2.0.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.