jerlov 0.5.0__tar.gz → 0.5.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. {jerlov-0.5.0/jerlov.egg-info → jerlov-0.5.2}/PKG-INFO +3 -3
  2. {jerlov-0.5.0 → jerlov-0.5.2}/README.md +2 -2
  3. {jerlov-0.5.0 → jerlov-0.5.2}/jerlov/__init__.py +1 -1
  4. {jerlov-0.5.0 → jerlov-0.5.2}/jerlov/_data.py +2 -1
  5. {jerlov-0.5.0 → jerlov-0.5.2}/jerlov/backscattering.py +11 -9
  6. {jerlov-0.5.0 → jerlov-0.5.2}/jerlov/data/boss2001_chi.csv +1 -1
  7. jerlov-0.5.2/jerlov/data/jerlov1976_kd.csv +4161 -0
  8. {jerlov-0.5.0 → jerlov-0.5.2}/jerlov/shortwave.py +9 -3
  9. {jerlov-0.5.0 → jerlov-0.5.2}/jerlov/sources.py +21 -1
  10. {jerlov-0.5.0 → jerlov-0.5.2}/jerlov/water.py +6 -4
  11. {jerlov-0.5.0 → jerlov-0.5.2/jerlov.egg-info}/PKG-INFO +3 -3
  12. {jerlov-0.5.0 → jerlov-0.5.2}/pyproject.toml +1 -1
  13. {jerlov-0.5.0 → jerlov-0.5.2}/tests/test_api.py +35 -0
  14. {jerlov-0.5.0 → jerlov-0.5.2}/tests/test_backscattering.py +2 -1
  15. {jerlov-0.5.0 → jerlov-0.5.2}/tests/test_quoted_figures.py +9 -4
  16. {jerlov-0.5.0 → jerlov-0.5.2}/tests/test_reproduces_papers.py +45 -5
  17. jerlov-0.5.0/jerlov/data/jerlov1976_kd.csv +0 -4161
  18. {jerlov-0.5.0 → jerlov-0.5.2}/LICENSE +0 -0
  19. {jerlov-0.5.0 → jerlov-0.5.2}/NOTICE +0 -0
  20. {jerlov-0.5.0 → jerlov-0.5.2}/jerlov/colour.py +0 -0
  21. {jerlov-0.5.0 → jerlov-0.5.2}/jerlov/data/__init__.py +0 -0
  22. {jerlov-0.5.0 → jerlov-0.5.2}/jerlov/data/austin1986_kd.csv +0 -0
  23. {jerlov-0.5.0 → jerlov-0.5.2}/jerlov/data/austin1986_model.csv +0 -0
  24. {jerlov-0.5.0 → jerlov-0.5.2}/jerlov/data/cie1931_2deg_cmf.csv +0 -0
  25. {jerlov-0.5.0 → jerlov-0.5.2}/jerlov/data/cie_d65.csv +0 -0
  26. {jerlov-0.5.0 → jerlov-0.5.2}/jerlov/data/jerlov1968_kd.csv +0 -0
  27. {jerlov-0.5.0 → jerlov-0.5.2}/jerlov/data/jerlov1968_total_irradiance.csv +0 -0
  28. {jerlov-0.5.0 → jerlov-0.5.2}/jerlov/data/paulson1977_shortwave.csv +0 -0
  29. {jerlov-0.5.0 → jerlov-0.5.2}/jerlov/data/smart2007_b_from_c.csv +0 -0
  30. {jerlov-0.5.0 → jerlov-0.5.2}/jerlov/data/solonenko2015_iop.csv +0 -0
  31. {jerlov-0.5.0 → jerlov-0.5.2}/jerlov/data/williamson2022_iop.csv +0 -0
  32. {jerlov-0.5.0 → jerlov-0.5.2}/jerlov/data/williamson2022_measured.csv +0 -0
  33. {jerlov-0.5.0 → jerlov-0.5.2}/jerlov/data/williamson2023_depth.csv +0 -0
  34. {jerlov-0.5.0 → jerlov-0.5.2}/jerlov/py.typed +0 -0
  35. {jerlov-0.5.0 → jerlov-0.5.2}/jerlov/scene.py +0 -0
  36. {jerlov-0.5.0 → jerlov-0.5.2}/jerlov.egg-info/SOURCES.txt +0 -0
  37. {jerlov-0.5.0 → jerlov-0.5.2}/jerlov.egg-info/dependency_links.txt +0 -0
  38. {jerlov-0.5.0 → jerlov-0.5.2}/jerlov.egg-info/requires.txt +0 -0
  39. {jerlov-0.5.0 → jerlov-0.5.2}/jerlov.egg-info/top_level.txt +0 -0
  40. {jerlov-0.5.0 → jerlov-0.5.2}/setup.cfg +0 -0
  41. {jerlov-0.5.0 → jerlov-0.5.2}/tests/test_colour.py +0 -0
  42. {jerlov-0.5.0 → jerlov-0.5.2}/tests/test_depth.py +0 -0
  43. {jerlov-0.5.0 → jerlov-0.5.2}/tests/test_packaging.py +0 -0
  44. {jerlov-0.5.0 → jerlov-0.5.2}/tests/test_scene.py +0 -0
  45. {jerlov-0.5.0 → jerlov-0.5.2}/tests/test_shortwave.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: jerlov
3
- Version: 0.5.0
3
+ Version: 0.5.2
4
4
  Summary: Inherent optical properties of Jerlov water types, with provenance
5
5
  Author: T. Ishibashi
6
6
  License-Expression: Apache-2.0
@@ -101,7 +101,7 @@ reconstructed at 650 nm. ...
101
101
  |---|---|---|---|
102
102
  | `williamson2022` | measurement | IB-5C | 300-800 nm |
103
103
  | `solonenko2015` | inversion of Kd | I-9C | 300-700 nm |
104
- | `jerlov1976` | Kd only | I-9C | 300-715 nm |
104
+ | `jerlov1976` | Kd only | I-9C | 300-715 nm; printed 310-700, and outside that it warns |
105
105
  | `jerlov1968` | Kd only, first edition | I-9C | 310-700 nm |
106
106
  | `austin1986` | Kd only, replacement values | I-1C | 350-700 nm |
107
107
 
@@ -223,7 +223,7 @@ r.chi_p, r.quoted_error_percent # 1.18, 3.5
223
223
  Boss & Pegau (2001). The pure sea water terms are analytic and are checked
224
224
  against the definition of bb rather than transcribed; only the particle
225
225
  conversion is tabulated. Angles outside 90-170 degrees are refused, and 170
226
- warns: its quoted spread is **34.8 percent** against 3-6 in the middle.
226
+ warns: its quoted spread is **34.8 percent** against 2.6-6.4 from 90 to 160.
227
227
 
228
228
  This gives the bb of the water your instrument was in. It still gives no bb
229
229
  for a Jerlov water type, because nothing does.
@@ -76,7 +76,7 @@ reconstructed at 650 nm. ...
76
76
  |---|---|---|---|
77
77
  | `williamson2022` | measurement | IB-5C | 300-800 nm |
78
78
  | `solonenko2015` | inversion of Kd | I-9C | 300-700 nm |
79
- | `jerlov1976` | Kd only | I-9C | 300-715 nm |
79
+ | `jerlov1976` | Kd only | I-9C | 300-715 nm; printed 310-700, and outside that it warns |
80
80
  | `jerlov1968` | Kd only, first edition | I-9C | 310-700 nm |
81
81
  | `austin1986` | Kd only, replacement values | I-1C | 350-700 nm |
82
82
 
@@ -198,7 +198,7 @@ r.chi_p, r.quoted_error_percent # 1.18, 3.5
198
198
  Boss & Pegau (2001). The pure sea water terms are analytic and are checked
199
199
  against the definition of bb rather than transcribed; only the particle
200
200
  conversion is tabulated. Angles outside 90-170 degrees are refused, and 170
201
- warns: its quoted spread is **34.8 percent** against 3-6 in the middle.
201
+ warns: its quoted spread is **34.8 percent** against 2.6-6.4 from 90 to 160.
202
202
 
203
203
  This gives the bb of the water your instrument was in. It still gives no bb
204
204
  for a Jerlov water type, because nothing does.
@@ -86,4 +86,4 @@ __all__ = [
86
86
  "MissingQuantityError",
87
87
  ]
88
88
 
89
- __version__ = "0.5.0"
89
+ __version__ = "0.5.2"
@@ -56,7 +56,8 @@ def _frozen(array: np.ndarray) -> np.ndarray:
56
56
  #: Values whose ``status`` is one of these should not be used without the
57
57
  #: caller being told. See DATA.md sections 1-6.
58
58
  QUESTIONABLE = frozenset({"suspect", "missing", "extrapolated",
59
- "model_extrapolation", "reconstructed"})
59
+ "model_extrapolation", "reconstructed",
60
+ "extrapolated_by_dataset"})
60
61
 
61
62
 
62
63
  def _read(name: str) -> list[dict[str, str]]:
@@ -48,10 +48,12 @@ _ERROR_WARN_PERCENT = 10.0
48
48
  class AngleWarning(UserWarning):
49
49
  """The conversion is poorly constrained at the requested angle.
50
50
 
51
- The shape of the volume scattering function varies most steeply near 90
52
- and 180 degrees, so a single-angle measurement there pins bb least well.
53
- Both Boss & Pegau (2001) and Maffione & Dana (1997) recommend 110 to 160
54
- degrees.
51
+ The shape of the volume scattering function varies most near 90 and 180
52
+ degrees, so a single-angle measurement there pins bb least well. Maffione
53
+ & Dana (1997) recommend sensors covering roughly 110 to 160 degrees. Boss
54
+ & Pegau (2001) recommend measuring near 117 degrees, and otherwise
55
+ removing the water contribution first, which they support from near 90
56
+ to 160 degrees.
55
57
  """
56
58
 
57
59
 
@@ -124,15 +126,15 @@ def _chi_table():
124
126
  def particulate_chi(angle_deg):
125
127
  """``chi_p`` at one angle, interpolated within Boss & Pegau Table 1.
126
128
 
127
- Refuses outside 90 to 170 degrees, the range their measurements cover.
129
+ Refuses outside 90 to 170 degrees, the range their Table 1 covers.
128
130
  """
129
131
  angle = float(angle_deg)
130
132
  if not MIN_ANGLE_DEG <= angle <= MAX_ANGLE_DEG:
131
133
  raise ValueError(
132
134
  f"chi_p is tabulated from {MIN_ANGLE_DEG:g} to {MAX_ANGLE_DEG:g} "
133
- f"degrees and {angle:g} is outside that. Boss & Pegau made no "
134
- "measurement beyond 170 degrees, and this package does not "
135
- "extrapolate."
135
+ f"degrees and {angle:g} is outside that. Boss & Pegau tabulate no "
136
+ "angle beyond 170 degrees, although their instrument reached "
137
+ "177.3, and this package does not extrapolate."
136
138
  )
137
139
  angles, values, _ = _chi_table()
138
140
  return float(np.interp(angle, angles, values))
@@ -197,7 +199,7 @@ def bb_from_vsf(beta, angle_deg: float, wavelength_nm, *,
197
199
  if error > _ERROR_WARN_PERCENT:
198
200
  warnings.warn(
199
201
  f"chi_p at {angle:g} degrees carries a quoted spread of "
200
- f"{error:.1f}%, against 3-6% between 100 and 160 degrees. The "
202
+ f"{error:.1f}%, against 2.6-6.4% from 90 to 160 degrees. The "
201
203
  "scattering function varies steeply here and a single-angle "
202
204
  "measurement pins bb poorly.",
203
205
  AngleWarning,
@@ -7,7 +7,7 @@ boss2001,130,1.17,chi_p,3.3,ok,
7
7
  boss2001,140,1.18,chi_p,3.5,ok,
8
8
  boss2001,150,1.13,chi_p,4.2,ok,
9
9
  boss2001,160,1.0,chi_p,6.4,ok,
10
- boss2001,170,0.62,chi_p,34.8,suspect,"the volume scattering function varies most steeply here, and no measurement in the set went beyond 170 deg"
10
+ boss2001,170,0.62,chi_p,34.8,suspect,"the quoted spread is 34.8 percent here, against 2.6 to 6.4 at the other angles; Table 1 stops at this angle, although the instrument measured to 177.3 deg"
11
11
  oishi1990,120,1.14,chi,,other_definition,"chi including water, quoted by Maffione & Dana (1997) from Oishi (1990), Appl. Opt. 29, 4658"
12
12
  oishi1990,140,1.08,chi,,other_definition,as above
13
13
  maffione1997,140,1.08,chi,9.0,other_definition,"chi including water, Maffione & Dana (1997), Appl. Opt. 36, 6057, from Mie computations; the 9 percent is their standard deviation"