Skip to content

Commit

Permalink
remove the bit value in Dynamic range(3.1->4.0) (#153)
Browse files Browse the repository at this point in the history
* remove the bit value in Dynamic range(3.1->4.0)


Co-authored-by: Yutong Zhao <[email protected]>
  • Loading branch information
zhaoyutong43210 and Yutong Zhao authored Sep 7, 2022
1 parent 2f7beab commit e6e9b83
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 40 deletions.
25 changes: 8 additions & 17 deletions doc/datasets/datasets_results.rst
Original file line number Diff line number Diff line change
Expand Up @@ -105,14 +105,6 @@ Only *Short*, *Symbol* and *Comment* fields are optional::
<Value>0</Value>
<Unit></Unit>
</index_sensitivity_min>
<DR_bit>
<Comment></Comment>
<Short>Dynamic Range in bits</Short>
<LatexName>DRBit</LatexName>
<Value>10.2534914503</Value>
<Symbol>$DR_{bit}$</Symbol>
<Unit>bit</Unit>
</DR_bit>
<u_p_min>
<Comment></Comment>
<Short>Absolute sensitivity threshold</Short>
Expand Down Expand Up @@ -390,12 +382,12 @@ Only *Short*, *Symbol* and *Comment* fields are optional::
</dark_current>
</results>


Naming Convention
------------------

For details about the naming convention for the XML file content refer to the API documentation in the Process Mudule dokumentation in the resuls part.

API Reference: :class:`~emva1288.process.results.Results1288`


Expand Down Expand Up @@ -427,7 +419,7 @@ To process a reference set or any other image stack compliant to the image stack
f = open(os.path.join(dir_, fresult), "wb")
f.write(res.xml())
f.close()


Compare Results
----------------
Expand All @@ -454,7 +446,7 @@ This will output something like::
info
**********************************************************************
index_start 0.0 0.0 OK

**********************************************************************
sensitivity
**********************************************************************
Expand All @@ -475,25 +467,24 @@ This will output something like::
inverse_SNR_max 0.845981598556 0.845981598556 OK
index_sensitivity_min 0.0 0.0 OK
QE 45.1356082834 45.1356082834 OK
DR_bit 10.2534914503 10.2534914503 OK
sigma_d 10.8980275235 10.8980275235 OK

**********************************************************************
linearity
**********************************************************************
LE_max 0.480448332752 0.480448332752 OK
index_linearity_max 34.0 34.0 OK
index_linearity_min 2.0 2.0 OK
LE_min -0.615797581149 -0.615797581149 OK

**********************************************************************
defect_pixel
**********************************************************************
histogram_DSNU_accumulated Array Array OK
histogram_PRNU_accumulated Array Array OK
histogram_PRNU Array Array OK
histogram_DSNU Array Array OK

**********************************************************************
spatial
**********************************************************************
Expand All @@ -512,7 +503,7 @@ This will output something like::
s_2_y_measured_spectrogram_dark 0.213951679236 0.213951679236 OK
F_dark 1.13639226727 1.13639226727 OK
sigma_2_y_stack 553.573746657 553.573746657 OK

**********************************************************************
dark_current
**********************************************************************
Expand Down
15 changes: 0 additions & 15 deletions emva1288/process/results.py
Original file line number Diff line number Diff line change
Expand Up @@ -481,21 +481,6 @@ def DR_dB(self):

return 20. * np.log10(self.DR)

def DR_bit(self):
"""Dynamic Range in bits.
It is defined as log_2 ( Dynamic Range ).
.. emva1288::
:Section: sensitivity
:Short: Dynamic Range
:Symbol: $DR_{bit}$
:Unit: bit
:LatexName: DRBit
"""

return np.log2(self.DR)

@property
def index_linearity_min(self):
"""Linearity fit minimun index.
Expand Down
6 changes: 1 addition & 5 deletions emva1288/report/templates/op.tex
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,7 @@
& % %{{ op.results.sensitivity.DR_dB.symbol %}} &
%{{ '%.1f' % op.results.sensitivity.DR_dB.value %}} &
%{{ op.results.sensitivity.DR_dB.unit %}} \\
& % %{{ op.results.sensitivity.DR_bit.symbol %}} &
%{{ '%.1f' % op.results.sensitivity.DR_bit.value %}} &
%{{ op.results.sensitivity.DR_bit.unit %}} \\[3mm]
%{{ op.results.sensitivity.DR_dB.unit %}}[3mm]
\multicolumn{3}{l}{\textbf{Spatial Nonuniformities}} \\
Expand Down
3 changes: 0 additions & 3 deletions tests/test_results.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,6 @@ def test_DR(results):
# Test that DR_dB is 20log_10(DR)
assert results.DR_dB() == 20 * np.log10(results.DR)

# Test that DR_bit is log_2(DR)
assert results.DR_bit() == np.log2(results.DR)


@pytest.mark.parametrize("dataset", ['single_exposure'], indirect=True)
def test_DSNU(results):
Expand Down

0 comments on commit e6e9b83

Please sign in to comment.