Comments (6)
NB: for now, the following ugly hack does the job.
from D47crunch import *
rawdata = D47data()
rawdata.Nominal_D48 = {
'ETH-1': 0.138,
'ETH-2': 0.138,
'ETH-3': 0.270,
'ETH-4': 0.223,
}
rawdata.read('D48hack.csv')
rawdata.wg()
rawdata.crunch()
# temporarily replace all 47 values with 48 values
rawdata._Nominal_D47 = rawdata.Nominal_D47.copy()
rawdata.Nominal_D47 = rawdata.Nominal_D48.copy()
for r in rawdata:
r['_D47raw'] = r['D47raw']
r['_d47'] = r['d47']
r['D47raw'] = r['D48raw']
r['d47'] = r['d48']
rawdata.refresh()
rawdata.standardize()
D48_results = {}
D48_results['r_D48'] = rawdata.repeatability['r_D47']
D48_results['r_D48a'] = rawdata.repeatability['r_D47a']
D48_results['r_D48u'] = rawdata.repeatability['r_D47u']
for u in rawdata.unknowns:
D48_results[u] = {
'D48': rawdata.unknowns[u]['D47'],
'SE_D48': rawdata.unknowns[u]['SE_D47'],
}
print()
for k in D48_results:
print(f'{k:>8}: {D48_results[k]}')
This should generate the following output:
r_D48: 0.1237838550727198
r_D48a: 0.13195328760301325
r_D48u: 0.10585573189123085
DVH-2: {'D48': 0.2575489652935696, 'SE_D48': 0.03312408958860156}
LGB-2: {'D48': 0.30499761247804147, 'SE_D48': 0.03712619158271187}
from d47crunch.
Just pushed a new branch, D48
, which defines a D48data
class analogous to D47data
. This is yet another approach, based on the idea that in practice, Δ47 and Δ48 standardizations are mathematically independent (granted, scrambling corrections are likely to be the same, but let's ignore that for now).
The new branch seems to work as intended when doing this:
from D47crunch import *
rawdata = D47data()
rawdata.read('D48test.csv')
rawdata.wg()
rawdata.crunch()
rawdata.standardize()
rawdata.summary()
rawdata.table_of_sessions()
rawdata.table_of_samples()
rawdata.table_of_analyses()
rawdata.plot_sessions()
rawdata = D48data(rawdata)
rawdata.standardize()
rawdata.summary()
rawdata.table_of_sessions()
rawdata.table_of_samples()
rawdata.table_of_analyses()
rawdata.plot_sessions()
Please feel free to experiment and report any issues.
from d47crunch.
Hi!
I have been using the new version of the code and everything seems to run smoothly. However, today I run into a problem switching to the ""indep_sessions" method.
Here the traceback:
"Traceback (most recent call last):
File "/Users/mattiatag/Documents/Python Works/Standards Monitoring/Reference Frame.py", line 236, in
corrected = correction(path)
File "/Users/mattiatag/Documents/Python Works/Standards Monitoring/Reference Frame.py", line 31, in correction
clumpy.standardize(method = "indep_sessions")
File "/Users/mattiatag/.conda/envs/Science/lib/python3.9/site-packages/D4xCrunch/init.py", line 439, in newfun
out = oldfun(*args, **kwargs)
File "/Users/mattiatag/.conda/envs/Science/lib/python3.9/site-packages/D4xCrunch/init.py", line 1161, in standardize
r[f'wD{self._4x}'] /= (a + a2 * r['t'])
KeyError: 'wD47'
Process finished with exit code 1
from d47crunch.
@MattiaTag can you try again with the current version (d4288ca) of the dev
branch? I believe this bug was recently corrected.
from d47crunch.
Yes, it works fine in the new version!
from d47crunch.
Closed following v2.0 release.
from d47crunch.
Related Issues (15)
- decide on how to make plotting interfaces consistent HOT 5
- add a **see also** section to readme HOT 2
- clumpycrunch formatting
- issue with trying to set parameter b to 0 in standardize(constraints = ...) call HOT 7
- D47crunch name HOT 2
- missing depency: rich? HOT 1
- UTF-8 encoding of csv HOT 4
- Output temperature in Table of Samples? HOT 2
- `indep_sessions` standardization is not working HOT 1
- Update module-level table functions for Δ49
- crunch throws an error with failed d45 type HOT 11
- standardize throws an error because of package lmfit HOT 5
- Improve `plot_distribution_of_analyses` or throw warnings in case there are many sessions/samples HOT 7
- `standardize` is slow with large datasets HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from d47crunch.