Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
CTDAS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CTDAS
CTDAS
Commits
37f2aabb
Commit
37f2aabb
authored
12 years ago
by
ivar
Browse files
Options
Downloads
Patches
Plain Diff
removed conversion from mol/mol to ppm
parent
f14e469c
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
da/tools/MixingratioToPermil.py
+40
-0
40 additions, 0 deletions
da/tools/MixingratioToPermil.py
with
40 additions
and
0 deletions
da/tools/MixingratioToPermil.py
0 → 100755
+
40
−
0
View file @
37f2aabb
#!/usr/bin/env python
# MixingratioToPermil.py
"""
Author : ivar
Revision History:
File created on 11 May 2012.
"""
def
MixingratioToPermil
(
filename
,
simulated
):
"""
Converts 13C mixing ratios to permil values
"""
import
da.tools.io4
as
io
import
logging
import
numpy
as
np
pdb
=
0.011112
trlength
=
len
(
simulated
[
0
,:])
memlength
=
trlength
/
2
simulated
=
simulated
#*1.e6 #convert to ppm
# np.set_printoptions(threshold=np.nan)
# msg='simulated shape',simulated.shape;logging.info(msg)
# msg='simulated',simulated[0,0],simulated[0,40];logging.info(msg)
# msg='simulated',simulated ;logging.info(msg)
simulated
=
np
.
float64
(
simulated
)
simulated
[:,
memlength
:
trlength
]
=
1000.
*
((
simulated
[:,
memlength
:
trlength
]
/
simulated
[:,
0
:
memlength
]
/
pdb
)
-
1.
)
# msg='simulated',simulated[0,0],simulated[0,40],memlength,trlength,pdb;logging.info(msg)
# msg='simulated',simulated ;logging.info(msg)
return
simulated
if
__name__
==
"
__main__
"
:
pass
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment