Skip to content

Commit

Permalink
Moves fake data to fake data
Browse files Browse the repository at this point in the history
  • Loading branch information
lukecampbell committed Mar 12, 2013
1 parent 17d1e1a commit b9c95b0
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 17 deletions.
17 changes: 0 additions & 17 deletions ion_functions/data/data_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,3 @@ def data_density(SP, p, t, lat, lon):

return gsw.rho(abs_sal, cons_temp, p)

def data_l2_density(conductivity, temp,pressure, lat, lon):
'''
Based on calculations done here: https://github.com/ooici/coi-services/blob/master/ion/processes/data/transforms/ctd/ctd_L2_density.py#L55
'''
from pygsw import vectors as gsw
sp = gsw.sp_from_c(conductivity/42.914, temp, pressure)
sa = gsw.sa_from_sp(sp, pressure, lon, lat)
rho = gsw.rho(sa, temp, pressure)
return rho

def data_l2_salinity(conductivity, temp, pressure):
'''
Based on calculations done here: https://github.com/ooici/coi-services/blob/master/ion/processes/data/transforms/ctd/ctd_L2_salinity.py#L58
'''
import pygsw.vectors as gsw
sal_value = gsw.sp_from_c(conductivity/42.914, temp, pressure)
return sal_value
Empty file.
25 changes: 25 additions & 0 deletions ion_functions/workflow_tests/fake_data.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

'''
These functions are provided only to make fake data to test the workflow of the framework they are not validated and have no
scientific validations to support the accuracy of the algorithms.
'''

def data_l2_density(conductivity, temp,pressure, lat, lon):
'''
Based on calculations done here: https://github.com/ooici/coi-services/blob/master/ion/processes/data/transforms/ctd/ctd_L2_density.py#L55
'''
from pygsw import vectors as gsw
sp = gsw.sp_from_c(conductivity/42.914, temp, pressure)
sa = gsw.sa_from_sp(sp, pressure, lon, lat)
rho = gsw.rho(sa, temp, pressure)
return rho

def data_l2_salinity(conductivity, temp, pressure):
'''
Based on calculations done here: https://github.com/ooici/coi-services/blob/master/ion/processes/data/transforms/ctd/ctd_L2_salinity.py#L58
'''
import pygsw.vectors as gsw
sal_value = gsw.sp_from_c(conductivity/42.914, temp, pressure)
return sal_value

0 comments on commit b9c95b0

Please sign in to comment.