emccd-detect 2.2.5__tar.gz → 2.4.0__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.
@@ -0,0 +1,72 @@
1
+ Metadata-Version: 2.1
2
+ Name: emccd_detect
3
+ Version: 2.4.0
4
+ Summary: EMCCD detector image simulation
5
+ Author: Bijan Nemati, Sam Miller, Kevin Ludwick
6
+ Author-email: bijan.nemati@tellus1.com, sam.miller@uah.edu, kevin.ludwick@uah.edu
7
+ Classifier: Development Status :: 4 - Beta
8
+ Classifier: Intended Audience :: Developers
9
+ Classifier: Programming Language :: Python :: 3
10
+ Classifier: Programming Language :: Python :: 3.6
11
+ Classifier: Programming Language :: Python :: 3.7
12
+ Classifier: Programming Language :: Python :: 3.8
13
+ Requires-Python: >=3.6
14
+ Description-Content-Type: text/markdown
15
+ Requires-Dist: astropy
16
+ Requires-Dist: matplotlib
17
+ Requires-Dist: numpy
18
+ Requires-Dist: scipy
19
+ Requires-Dist: pynufft==2020.0.0
20
+ Requires-Dist: pyyaml
21
+
22
+ # EMCCD Detect
23
+
24
+ Given an input fluxmap, emccd_detect will return a simulated EMCCD detector image. Website: (<https://github.com/roman-corgi/emccd_detect/tree/master/emccd_detect>)
25
+
26
+
27
+ # Version
28
+
29
+ The latest version of emccd\_detect is 2.4.0. Main differences from previous version: the ability to implement readout nonlinearity and the latest version of arcticpy for charge transfer inefficiency implementation.
30
+
31
+
32
+ ## Getting Started
33
+ ### Installing
34
+
35
+ This package requires Python version 3.6 or higher. If the user wants the ability to apply charge transfer inefficiency (CTI) to detector frames using the optional tool (older version of arcticpy which is pure Python) provided in emccd\_detect, then the Python version should be >=3.6 and <=3.9. If the newer version of arcticpy (wrapper around C++ code) is installed, there is no upper limit restriction for Python version. For installation instructions and documentation for the newer arcticpy, see <https://github.com/jkeger/arctic>. emccd\_detect works apart from arcticpy and does not require it.
36
+
37
+ emccd\_detect is available on PyPI.org, so the following command will install the module (without CTI capabilities):
38
+
39
+ pip install emccd-detect
40
+
41
+ To install emccd\_detect instead from this package download, after downloading, navigate to the emccd\_detect directory where setup.py is located and use
42
+
43
+ pip install .
44
+
45
+ This will install emccd\_detect and its dependencies, which are as follows:
46
+
47
+ * astropy
48
+ * matplotlib
49
+ * numpy
50
+ * scipy
51
+ * pynufft==2020.0.0
52
+ * pyyaml
53
+
54
+ To optionally implement CTI capabilities with the pure-Python arcticpy, navigate to the arcticpy directory (<https://github.com/roman-corgi/emccd_detect/tree/master/arcticpy_folder>), and there will be a file called setup.py in that directory. Use
55
+
56
+ pip install .
57
+
58
+ This will install arcticpy version 1.0. See (<https://github.com/jkeger/arcticpy/tree/row_wise/arcticpy>) for documentation. If
59
+ you have Python>3.9, the CTI functionality will not work if you are using the arcticpy installation that was included with this emccd_detect package, but everything else will work fine.
60
+
61
+
62
+ ### Usage
63
+
64
+ For an example of how to use emccd\_detect, see example_script.py.
65
+
66
+
67
+ ## Authors
68
+
69
+ * Bijan Nemati (<bijan.nemati@tellus1.com>)
70
+ * Sam Miller (<sam.miller@uah.edu>)
71
+ * Kevin Ludwick (<kevin.ludwick@uah.edu>)
72
+
@@ -0,0 +1,51 @@
1
+ # EMCCD Detect
2
+
3
+ Given an input fluxmap, emccd_detect will return a simulated EMCCD detector image. Website: (<https://github.com/roman-corgi/emccd_detect/tree/master/emccd_detect>)
4
+
5
+
6
+ # Version
7
+
8
+ The latest version of emccd\_detect is 2.4.0. Main differences from previous version: the ability to implement readout nonlinearity and the latest version of arcticpy for charge transfer inefficiency implementation.
9
+
10
+
11
+ ## Getting Started
12
+ ### Installing
13
+
14
+ This package requires Python version 3.6 or higher. If the user wants the ability to apply charge transfer inefficiency (CTI) to detector frames using the optional tool (older version of arcticpy which is pure Python) provided in emccd\_detect, then the Python version should be >=3.6 and <=3.9. If the newer version of arcticpy (wrapper around C++ code) is installed, there is no upper limit restriction for Python version. For installation instructions and documentation for the newer arcticpy, see <https://github.com/jkeger/arctic>. emccd\_detect works apart from arcticpy and does not require it.
15
+
16
+ emccd\_detect is available on PyPI.org, so the following command will install the module (without CTI capabilities):
17
+
18
+ pip install emccd-detect
19
+
20
+ To install emccd\_detect instead from this package download, after downloading, navigate to the emccd\_detect directory where setup.py is located and use
21
+
22
+ pip install .
23
+
24
+ This will install emccd\_detect and its dependencies, which are as follows:
25
+
26
+ * astropy
27
+ * matplotlib
28
+ * numpy
29
+ * scipy
30
+ * pynufft==2020.0.0
31
+ * pyyaml
32
+
33
+ To optionally implement CTI capabilities with the pure-Python arcticpy, navigate to the arcticpy directory (<https://github.com/roman-corgi/emccd_detect/tree/master/arcticpy_folder>), and there will be a file called setup.py in that directory. Use
34
+
35
+ pip install .
36
+
37
+ This will install arcticpy version 1.0. See (<https://github.com/jkeger/arcticpy/tree/row_wise/arcticpy>) for documentation. If
38
+ you have Python>3.9, the CTI functionality will not work if you are using the arcticpy installation that was included with this emccd_detect package, but everything else will work fine.
39
+
40
+
41
+ ### Usage
42
+
43
+ For an example of how to use emccd\_detect, see example_script.py.
44
+
45
+
46
+ ## Authors
47
+
48
+ * Bijan Nemati (<bijan.nemati@tellus1.com>)
49
+ * Sam Miller (<sam.miller@uah.edu>)
50
+ * Kevin Ludwick (<kevin.ludwick@uah.edu>)
51
+
@@ -1,2 +1,2 @@
1
1
  # -*- coding: utf-8 -*-
2
- __version__ = '2.2.5'
2
+ __version__ = '2.4.0'
@@ -9,9 +9,10 @@ import numpy as np
9
9
 
10
10
  from emccd_detect.cosmics import cosmic_hits, sat_tails
11
11
  from emccd_detect.rand_em_gain import rand_em_gain
12
+ from emccd_detect.nonlinearity import apply_relgains
12
13
  from emccd_detect.util.read_metadata_wrapper import MetadataWrapper
13
14
  try:
14
- from arcticpy import add_cti, CCD, ROE, Trap, TrapInstantCapture
15
+ from arcticpy import add_cti, CCD, ROE, TrapInstantCapture
15
16
  except:
16
17
  pass
17
18
 
@@ -93,12 +94,15 @@ class EMCCDDetectBase:
93
94
  self.numel_gain_register = numel_gain_register
94
95
 
95
96
  # Placeholders for trap parameters
96
- self.ccd = None
97
- self.roe = None
98
- self.traps = None
99
- self.express = None
100
- self.offset = None
101
- self.window_range = None
97
+ self.parallel_ccd = None
98
+ self.parallel_roe = None
99
+ self.parallel_traps = None
100
+ self.parallel_express = None
101
+ self.serial_ccd = None
102
+ self.serial_roe = None
103
+ self.serial_traps = None
104
+ self.serial_express = None
105
+
102
106
 
103
107
  # Placeholders for derived values
104
108
  self.mean_expected_rate = None
@@ -122,36 +126,72 @@ class EMCCDDetectBase:
122
126
  try:
123
127
  def update_cti(
124
128
  self,
125
- ccd=None,
126
- roe=None,
127
- traps=None,
128
- express=1,
129
- offset=0,
130
- window_range=None
129
+ parallel_ccd=None,
130
+ parallel_roe=None,
131
+ parallel_traps=None,
132
+ parallel_express=1,
133
+ serial_ccd=None,
134
+ serial_roe=None,
135
+ serial_traps=None,
136
+ serial_express=1,
137
+ parallel=True,
138
+ serial=True,
139
+ **kwargs # any other arguments that arcticpy.add_cti() might accept
131
140
  ):
141
+ '''See arcticpy documentation for details on parameters. Any arguments
142
+ not explicitly listed here can be handed to arcticpy.add_cti() via
143
+ kwargs.
144
+
145
+ Parallel and serial CTI can each be switched on or off via the
146
+ "parallel" and "serial" arguments of this function. True means that
147
+ type of CTI is simulated. Both are True by default.'''
132
148
  # Update parameters
133
- self.ccd = ccd
134
- self.roe = roe
135
- self.traps = traps
136
-
137
- self.express = express
138
- self.offset = offset
139
- self.window_range = window_range
149
+ self.parallel_ccd = parallel_ccd
150
+ self.parallel_roe = parallel_roe
151
+ self.parallel_traps = parallel_traps
152
+ self.parallel_express = parallel_express
153
+ self.serial_ccd = serial_ccd
154
+ self.serial_roe = serial_roe
155
+ self.serial_traps = serial_traps
156
+ self.serial_express = serial_express
157
+ self.kwargs = kwargs
158
+ self.parallel = parallel
159
+ self.serial = serial
140
160
 
141
161
  # Instantiate defaults for any class instances not provided
142
- if self.ccd is None:
143
- self.ccd = CCD()
144
- if roe is None:
145
- self.roe = ROE()
146
- if traps is None:
162
+
163
+ if parallel_ccd is None:
164
+ self.parallel_ccd = CCD()
165
+ if parallel_roe is None:
166
+ self.parallel_roe = ROE()
167
+ if parallel_traps is None:
147
168
  #self.traps = [Trap()]
148
- self.traps = [TrapInstantCapture()]
169
+ self.parallel_traps = [TrapInstantCapture()]
170
+ if self.parallel is False: # overrides
171
+ self.parallel_ccd = None
172
+ self.parallel_roe = None
173
+ self.parallel_traps = None
174
+
175
+ if serial_ccd is None:
176
+ self.serial_ccd = CCD()
177
+ if serial_roe is None:
178
+ self.serial_roe = ROE()
179
+ if serial_traps is None:
180
+ self.serial_traps = [TrapInstantCapture()]
181
+ if self.serial is False: #overrides
182
+ self.serial_ccd = None
183
+ self.serial_roe = None
184
+ self.serial_traps = None
149
185
 
150
186
  def unset_cti(self):
187
+ '''This turns off all CTI implementation.'''
151
188
  # Remove CTI simulation
152
- self.ccd = None
153
- self.roe = None
154
- self.traps = None
189
+ self.parallel_ccd = None
190
+ self.parallel_roe = None
191
+ self.parallel_traps = None
192
+ self.serial_ccd = None
193
+ self.serial_roe = None
194
+ self.serial_traps = None
155
195
  except:
156
196
  pass
157
197
 
@@ -224,16 +264,26 @@ class EMCCDDetectBase:
224
264
 
225
265
  def clock_parallel(self, actualized_e):
226
266
  # Only add CTI if update_cti has been called
227
- if self.ccd is not None and self.roe is not None and self.traps is not None:
228
- parallel_counts = add_cti(
229
- actualized_e.copy(),
230
- parallel_roe=self.roe,
231
- parallel_ccd=self.ccd,
232
- parallel_traps=self.traps,
233
- parallel_express=self.express,
234
- parallel_offset=self.offset,
235
- parallel_window_range=self.window_range
236
- )
267
+ if self.parallel_ccd is not None and self.parallel_roe is not None and self.parallel_traps is not None:
268
+ try:
269
+ parallel_counts = add_cti(
270
+ actualized_e.copy(),
271
+ parallel_roe=self.parallel_roe,
272
+ parallel_ccd=self.parallel_ccd,
273
+ parallel_traps=self.parallel_traps,
274
+ parallel_express=self.parallel_express,
275
+ **self.kwargs
276
+ )
277
+ except:
278
+ parallel_counts = add_cti(
279
+ actualized_e.copy(),
280
+ parallel_roe=self.parallel_roe,
281
+ parallel_ccd=self.parallel_ccd,
282
+ parallel_traps=self.parallel_traps,
283
+ parallel_express=self.parallel_express,
284
+ parallel_window_range=0,
285
+ **self.kwargs
286
+ )
237
287
  else:
238
288
  parallel_counts = actualized_e
239
289
 
@@ -241,12 +291,37 @@ class EMCCDDetectBase:
241
291
 
242
292
  def clock_serial(self, actualized_e_full, empty_element_m):
243
293
  # Actualize cic electrons in prescan and overscan pixels
244
- # XXX Another place where we are fudging a little
294
+ # XXX Another place where we are fudging a little as far as the order of operations(?)
245
295
  actualized_e_full[empty_element_m] = np.random.poisson(actualized_e_full[empty_element_m]
246
296
  + self.cic)
247
- # XXX Call arcticpy here
297
+
298
+ # add serial CTI; the addition of CIC (serial and parallel) is really
299
+ # *during* the addition of CTI, but this corrective effect would not be very significant
300
+ if self.serial_ccd is not None and self.serial_roe is not None and self.serial_traps is not None:
301
+ try:
302
+ cti_actualized_e_full = add_cti(
303
+ actualized_e_full.copy(),
304
+ serial_roe=self.serial_roe,
305
+ serial_ccd=self.serial_ccd,
306
+ serial_traps=self.serial_traps,
307
+ serial_express=self.serial_express,
308
+ **self.kwargs
309
+ )
310
+ except:
311
+ cti_actualized_e_full = add_cti(
312
+ actualized_e_full.copy(),
313
+ serial_roe=self.serial_roe,
314
+ serial_ccd=self.serial_ccd,
315
+ serial_traps=self.serial_traps,
316
+ serial_express=self.serial_express,
317
+ serial_window_range=0,
318
+ **self.kwargs
319
+ )
320
+ else:
321
+ cti_actualized_e_full = actualized_e_full
322
+
248
323
  # Flatten row by row
249
- actualized_e_full_flat = actualized_e_full.ravel()
324
+ actualized_e_full_flat = cti_actualized_e_full.ravel()
250
325
 
251
326
  # Clock electrons through serial register elements
252
327
  serial_counts = self._serial_register_elements(actualized_e_full_flat)
@@ -260,7 +335,8 @@ class EMCCDDetectBase:
260
335
  # Pass electrons through amplifier
261
336
  amp_ev = self._amp(gain_counts)
262
337
 
263
- # Pass amp electron volt counts through analog to digital converter
338
+ # Pass amp electron volt counts through analog to digital converter,
339
+ # applying nonlinearity if applicable
264
340
  output_dn = self._adc(amp_ev)
265
341
 
266
342
  return output_dn
@@ -400,10 +476,16 @@ class EMCCDDetectBase:
400
476
  Analog to digital converter output (dn).
401
477
 
402
478
  """
403
- # Convert from electron volts to dn
479
+ # Convert from electron volts to dn and apply nonlin if applicable
480
+ dn = amp_ev / self.eperdn
481
+ if hasattr(self, 'nonlin_path'):
482
+ if self.nonlin_path is not None:
483
+ nonlin_factors = apply_relgains(dn, self.em_gain,
484
+ self.nonlin_path)
485
+ dn *= nonlin_factors
404
486
  dn_min = 0
405
487
  dn_max = 2**self.nbits - 1
406
- output_dn = np.clip(amp_ev / self.eperdn, dn_min, dn_max).astype(np.uint64)
488
+ output_dn = np.clip(dn, dn_min, dn_max).astype(np.uint64)
407
489
 
408
490
  return output_dn
409
491
 
@@ -445,7 +527,13 @@ class EMCCDDetect(EMCCDDetectBase):
445
527
  Number of gain register elements. For eventually modeling partial CIC.
446
528
  Defaults to 604.
447
529
  meta_path : str
448
- Full path of metadata.yaml.
530
+ Full path of metadata.yaml. If None, defaults to metadata.yaml in util
531
+ folder.
532
+ nonlin_path : str
533
+ Path of nonlinearity correction file. See doc string of
534
+ nonlinearity.apply_relgains for details on the required
535
+ format of the file. If None, defaults to no application of
536
+ nonlinearity.
449
537
 
450
538
  """
451
539
  def __init__(
@@ -463,7 +551,8 @@ class EMCCDDetect(EMCCDDetectBase):
463
551
  eperdn=None,
464
552
  nbits=14,
465
553
  numel_gain_register=604,
466
- meta_path=None
554
+ meta_path=None,
555
+ nonlin_path=None
467
556
  ):
468
557
  # If no metadata file path specified, default to metadata.yaml in util
469
558
  if meta_path is None:
@@ -480,6 +569,8 @@ class EMCCDDetect(EMCCDDetectBase):
480
569
  if eperdn is None:
481
570
  eperdn = self.meta.eperdn
482
571
 
572
+ self.nonlin_path = nonlin_path
573
+
483
574
  super().__init__(
484
575
  em_gain=em_gain,
485
576
  full_well_image=full_well_image,
@@ -0,0 +1,134 @@
1
+ # -*- coding: utf-8 -*-
2
+ """Module for imposing nonlinearity (inverse of relative gains) for each
3
+ pixel of a frame.
4
+
5
+ Relative gain is dependent on both the detector gain and the dn count
6
+ value of a given pixel.
7
+
8
+ Adapted from https://github.com/roman-corgi/cgi_iit_drp/blob/main/proc_cgi_frame_NTR/proc_cgi_frame/gsw_nonlin.py.
9
+ """
10
+
11
+ import numpy as np
12
+ from scipy import interpolate
13
+
14
+
15
+ class NonlinException(Exception):
16
+ """Exception class for nonlin module."""
17
+
18
+
19
+ def _parse_file(nonlin_path):
20
+ """Get data from nonlinearity correction file."""
21
+ # Read nonlin csv
22
+ nonlin_raw = np.genfromtxt(nonlin_path, delimiter=',')
23
+
24
+ # File format checks
25
+ if nonlin_raw.ndim < 2 or nonlin_raw.shape[0] < 2 or \
26
+ nonlin_raw.shape[1] < 2:
27
+ raise NonlinException('Nonlin array must be at least 2x2 (room for x '
28
+ 'and y axes and one data point)')
29
+ if not np.isnan(nonlin_raw[0, 0]):
30
+ raise NonlinException('First value of csv (upper left) must be set to '
31
+ '"nan"')
32
+
33
+ # Column headers are gains, row headers are dn counts
34
+ gain_ax = nonlin_raw[0, 1:]
35
+ count_ax = nonlin_raw[1:, 0]
36
+ # Array is relative gain values at a given dn count and gain
37
+ relgains = nonlin_raw[1:, 1:]
38
+
39
+ # Check for increasing axes
40
+ if np.any(np.diff(gain_ax) <= 0):
41
+ raise NonlinException('Gain axis (column headers) must be increasing')
42
+ if np.any(np.diff(count_ax) <= 0):
43
+ raise NonlinException('Counts axis (row headers) must be increasing')
44
+ # Check that curves (data in columns) contain or straddle 1.0
45
+ if (np.min(relgains, axis=0) > 1).any() or \
46
+ (np.max(relgains, axis=0) < 1).any():
47
+ raise NonlinException('Gain curves (array columns) must contain or '
48
+ 'straddle a relative gain of 1.0')
49
+
50
+ return gain_ax, count_ax, relgains
51
+
52
+
53
+ def apply_relgains(frame, em_gain, nonlin_path):
54
+ """For a given bias-subtracted flattened frame of dn counts,
55
+ return a same-size array of inverse relative gain values.
56
+ "Relative gain" here is the value
57
+ to correct for nonlinearity, the values from the input at nonlin_path, but
58
+ since this function applies nonlinearity, it returns the corresponding
59
+ inverse values.
60
+
61
+ The required format for the file specified at nonlin_path is as follows:
62
+ - CSV
63
+ - Minimum 2x2
64
+ - First value (top left) must be assigned to nan
65
+ - Row headers (dn counts) must be monotonically increasing
66
+ - Column headers (EM gains) must be monotonically increasing
67
+ - Data columns (relative gain curves) must straddle 1
68
+
69
+ For example:
70
+
71
+ [
72
+ [nan, 1, 10, 100, 1000 ],
73
+ [1, 0.900, 0.950, 0.989, 1.000],
74
+ [1000, 0.910, 0.960, 0.990, 1.010],
75
+ [2000, 0.950, 1.000, 1.010, 1.050],
76
+ [3000, 1.000, 1.001, 1.011, 1.060],
77
+ ],
78
+
79
+ where the row headers [1, 1000, 2000, 3000] are dn counts, the column
80
+ headers [1, 10, 100, 1000] are EM gains, and the first data column
81
+ [0.900, 0.910, 0.950, 1.000] is the first of the four relative gain curves.
82
+
83
+ Parameters
84
+ ----------
85
+ frame : array_like
86
+ Flattened array of dn count values.
87
+ em_gain : float
88
+ Detector EM gain.
89
+ nonlin_path : str
90
+ Full path of nonlinearity calibration csv.
91
+
92
+ Returns
93
+ -------
94
+ array_like
95
+ Flattened array of inverse relative gain values.
96
+
97
+ Notes
98
+ -----
99
+ This algorithm contains two interpolations:
100
+
101
+ - A 2d interpolation to find the relative gain curve for a given EM gain
102
+ - A 1d interpolation to find a relative gain value for each given dn
103
+ count value.
104
+
105
+ Both of these interpolations are linear, and both use their edge values as
106
+ constant extrapolations for out of bounds values.
107
+
108
+ """
109
+
110
+ # Get file data
111
+ gain_ax, count_ax, relgains = _parse_file(nonlin_path)
112
+
113
+ # Create interpolation for em gain (x), counts (y), and relative gain (z).
114
+ # Note that this defaults to using the edge values as fill_value for
115
+ # out of bounds values (same as specified below in interp1d)
116
+ f = interpolate.RectBivariateSpline(gain_ax,
117
+ count_ax,
118
+ relgains.T,
119
+ kx=1,
120
+ ky=1,
121
+ )
122
+ # Get the relative gain curve for the given gain value
123
+ relgain_curve = f(em_gain, count_ax)[0]
124
+
125
+ # Create interpolation for dn counts (x) and relative gains (y). For
126
+ # out of bounds values use edge values
127
+ ff = interpolate.interp1d(count_ax, relgain_curve, kind='linear',
128
+ bounds_error=False,
129
+ fill_value=(relgain_curve[0], relgain_curve[-1]))
130
+ # For each dn count, find the inverse of the relative gain since
131
+ # we are applying nonlinearity instead of correcting for it
132
+ counts_flat = 1/ff(frame)
133
+
134
+ return counts_flat
@@ -0,0 +1,72 @@
1
+ Metadata-Version: 2.1
2
+ Name: emccd_detect
3
+ Version: 2.4.0
4
+ Summary: EMCCD detector image simulation
5
+ Author: Bijan Nemati, Sam Miller, Kevin Ludwick
6
+ Author-email: bijan.nemati@tellus1.com, sam.miller@uah.edu, kevin.ludwick@uah.edu
7
+ Classifier: Development Status :: 4 - Beta
8
+ Classifier: Intended Audience :: Developers
9
+ Classifier: Programming Language :: Python :: 3
10
+ Classifier: Programming Language :: Python :: 3.6
11
+ Classifier: Programming Language :: Python :: 3.7
12
+ Classifier: Programming Language :: Python :: 3.8
13
+ Requires-Python: >=3.6
14
+ Description-Content-Type: text/markdown
15
+ Requires-Dist: astropy
16
+ Requires-Dist: matplotlib
17
+ Requires-Dist: numpy
18
+ Requires-Dist: scipy
19
+ Requires-Dist: pynufft==2020.0.0
20
+ Requires-Dist: pyyaml
21
+
22
+ # EMCCD Detect
23
+
24
+ Given an input fluxmap, emccd_detect will return a simulated EMCCD detector image. Website: (<https://github.com/roman-corgi/emccd_detect/tree/master/emccd_detect>)
25
+
26
+
27
+ # Version
28
+
29
+ The latest version of emccd\_detect is 2.4.0. Main differences from previous version: the ability to implement readout nonlinearity and the latest version of arcticpy for charge transfer inefficiency implementation.
30
+
31
+
32
+ ## Getting Started
33
+ ### Installing
34
+
35
+ This package requires Python version 3.6 or higher. If the user wants the ability to apply charge transfer inefficiency (CTI) to detector frames using the optional tool (older version of arcticpy which is pure Python) provided in emccd\_detect, then the Python version should be >=3.6 and <=3.9. If the newer version of arcticpy (wrapper around C++ code) is installed, there is no upper limit restriction for Python version. For installation instructions and documentation for the newer arcticpy, see <https://github.com/jkeger/arctic>. emccd\_detect works apart from arcticpy and does not require it.
36
+
37
+ emccd\_detect is available on PyPI.org, so the following command will install the module (without CTI capabilities):
38
+
39
+ pip install emccd-detect
40
+
41
+ To install emccd\_detect instead from this package download, after downloading, navigate to the emccd\_detect directory where setup.py is located and use
42
+
43
+ pip install .
44
+
45
+ This will install emccd\_detect and its dependencies, which are as follows:
46
+
47
+ * astropy
48
+ * matplotlib
49
+ * numpy
50
+ * scipy
51
+ * pynufft==2020.0.0
52
+ * pyyaml
53
+
54
+ To optionally implement CTI capabilities with the pure-Python arcticpy, navigate to the arcticpy directory (<https://github.com/roman-corgi/emccd_detect/tree/master/arcticpy_folder>), and there will be a file called setup.py in that directory. Use
55
+
56
+ pip install .
57
+
58
+ This will install arcticpy version 1.0. See (<https://github.com/jkeger/arcticpy/tree/row_wise/arcticpy>) for documentation. If
59
+ you have Python>3.9, the CTI functionality will not work if you are using the arcticpy installation that was included with this emccd_detect package, but everything else will work fine.
60
+
61
+
62
+ ### Usage
63
+
64
+ For an example of how to use emccd\_detect, see example_script.py.
65
+
66
+
67
+ ## Authors
68
+
69
+ * Bijan Nemati (<bijan.nemati@tellus1.com>)
70
+ * Sam Miller (<sam.miller@uah.edu>)
71
+ * Kevin Ludwick (<kevin.ludwick@uah.edu>)
72
+
@@ -1,8 +1,10 @@
1
1
  README.md
2
+ pyproject.toml
2
3
  setup.py
3
4
  emccd_detect/__init__.py
4
5
  emccd_detect/cosmics.py
5
6
  emccd_detect/emccd_detect.py
7
+ emccd_detect/nonlinearity.py
6
8
  emccd_detect/rand_em_gain.py
7
9
  emccd_detect.egg-info/PKG-INFO
8
10
  emccd_detect.egg-info/SOURCES.txt
@@ -0,0 +1,3 @@
1
+ [build-system]
2
+ requires = ["setuptools"]
3
+ build-backend = "setuptools.build_meta"
@@ -2,7 +2,7 @@
2
2
  from io import open
3
3
  from os import path
4
4
  from setuptools import setup, find_packages, find_namespace_packages
5
- import emccd_detect
5
+ #import emccd_detect
6
6
 
7
7
  here = path.abspath(path.dirname(__file__))
8
8
 
@@ -11,11 +11,11 @@ with open(path.join(here, 'README.md'), encoding='utf-8') as f:
11
11
 
12
12
  setup(
13
13
  name='emccd_detect',
14
- version=emccd_detect.__version__,
14
+ version='2.4.0', #emccd_detect.__version__,
15
15
  description='EMCCD detector image simulation',
16
16
  long_description=long_description,
17
17
  long_description_content_type='text/markdown',
18
- url='https://github.jpl.nasa.gov/WFIRST-CGI/emccd_detect',
18
+ #url='https://github.jpl.nasa.gov/WFIRST-CGI/emccd_detect',
19
19
  author='Bijan Nemati, Sam Miller, Kevin Ludwick',
20
20
  author_email='bijan.nemati@tellus1.com, sam.miller@uah.edu, kevin.ludwick@uah.edu',
21
21
  classifiers=[
@@ -1,69 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: emccd_detect
3
- Version: 2.2.5
4
- Summary: EMCCD detector image simulation
5
- Home-page: https://github.jpl.nasa.gov/WFIRST-CGI/emccd_detect
6
- Author: Bijan Nemati, Sam Miller, Kevin Ludwick
7
- Author-email: bijan.nemati@tellus1.com, sam.miller@uah.edu, kevin.ludwick@uah.edu
8
- Classifier: Development Status :: 4 - Beta
9
- Classifier: Intended Audience :: Developers
10
- Classifier: Programming Language :: Python :: 3
11
- Classifier: Programming Language :: Python :: 3.6
12
- Classifier: Programming Language :: Python :: 3.7
13
- Classifier: Programming Language :: Python :: 3.8
14
- Requires-Python: >=3.6
15
- Description-Content-Type: text/markdown
16
- Requires-Dist: astropy
17
- Requires-Dist: matplotlib
18
- Requires-Dist: numpy
19
- Requires-Dist: scipy
20
- Requires-Dist: pynufft==2020.0.0
21
- Requires-Dist: pyyaml
22
-
23
- # EMCCD Detect
24
-
25
- Given an input fluxmap, emccd_detect will return a simulated EMCCD detector image.
26
-
27
-
28
- # Version
29
-
30
- The latest version of emccd\_detect is 2.2.5.
31
-
32
-
33
- ## Getting Started
34
- ### Installing
35
-
36
- This package requires Python version 3.6 or higher. If the user wants the ability to apply charge transfer inefficiency (CTI) to detector frames using the optional tool provided in emccd\_detect, then the Python version should be >=3.6 and <=3.9.
37
-
38
- To install emccd\_detect, navigate to the emccd\_detect directory where setup.py is located and use
39
-
40
- pip install .
41
-
42
- This will install emccd\_detect and its dependencies, which are as follows:
43
-
44
- * astropy
45
- * matplotlib
46
- * numpy
47
- * scipy
48
- * pynufft==2020.0.0
49
- * pyyaml
50
-
51
- To optionally implement CTI capabilities, navigate to the arcticpy directory (<https://github.com/roman-corgi/emccd_detect/tree/master/arcticpy_folder>), and there will be a file called setup.py in that directory. Use
52
-
53
- pip install .
54
-
55
- This will install arcticpy version 1.0, which is an older version of arcticpy which runs purely on Python (<https://github.com/jkeger/arcticpy/tree/row_wise/arcticpy>). If
56
- you have Python>=3.10, the CTI functionality will not work if you are using the arcticpy installation that was included with this emccd_detect package, but everything else will work fine.
57
-
58
-
59
- ### Usage
60
-
61
- For an example of how to use emccd\_detect, see example_script.py.
62
-
63
-
64
- ## Authors
65
-
66
- * Bijan Nemati (<bijan.nemati@tellus1.com>)
67
- * Sam Miller (<sam.miller@uah.edu>)
68
- * Kevin Ludwick (<kevin.ludwick@uah.edu>)
69
-
@@ -1,47 +0,0 @@
1
- # EMCCD Detect
2
-
3
- Given an input fluxmap, emccd_detect will return a simulated EMCCD detector image.
4
-
5
-
6
- # Version
7
-
8
- The latest version of emccd\_detect is 2.2.5.
9
-
10
-
11
- ## Getting Started
12
- ### Installing
13
-
14
- This package requires Python version 3.6 or higher. If the user wants the ability to apply charge transfer inefficiency (CTI) to detector frames using the optional tool provided in emccd\_detect, then the Python version should be >=3.6 and <=3.9.
15
-
16
- To install emccd\_detect, navigate to the emccd\_detect directory where setup.py is located and use
17
-
18
- pip install .
19
-
20
- This will install emccd\_detect and its dependencies, which are as follows:
21
-
22
- * astropy
23
- * matplotlib
24
- * numpy
25
- * scipy
26
- * pynufft==2020.0.0
27
- * pyyaml
28
-
29
- To optionally implement CTI capabilities, navigate to the arcticpy directory (<https://github.com/roman-corgi/emccd_detect/tree/master/arcticpy_folder>), and there will be a file called setup.py in that directory. Use
30
-
31
- pip install .
32
-
33
- This will install arcticpy version 1.0, which is an older version of arcticpy which runs purely on Python (<https://github.com/jkeger/arcticpy/tree/row_wise/arcticpy>). If
34
- you have Python>=3.10, the CTI functionality will not work if you are using the arcticpy installation that was included with this emccd_detect package, but everything else will work fine.
35
-
36
-
37
- ### Usage
38
-
39
- For an example of how to use emccd\_detect, see example_script.py.
40
-
41
-
42
- ## Authors
43
-
44
- * Bijan Nemati (<bijan.nemati@tellus1.com>)
45
- * Sam Miller (<sam.miller@uah.edu>)
46
- * Kevin Ludwick (<kevin.ludwick@uah.edu>)
47
-
@@ -1,69 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: emccd_detect
3
- Version: 2.2.5
4
- Summary: EMCCD detector image simulation
5
- Home-page: https://github.jpl.nasa.gov/WFIRST-CGI/emccd_detect
6
- Author: Bijan Nemati, Sam Miller, Kevin Ludwick
7
- Author-email: bijan.nemati@tellus1.com, sam.miller@uah.edu, kevin.ludwick@uah.edu
8
- Classifier: Development Status :: 4 - Beta
9
- Classifier: Intended Audience :: Developers
10
- Classifier: Programming Language :: Python :: 3
11
- Classifier: Programming Language :: Python :: 3.6
12
- Classifier: Programming Language :: Python :: 3.7
13
- Classifier: Programming Language :: Python :: 3.8
14
- Requires-Python: >=3.6
15
- Description-Content-Type: text/markdown
16
- Requires-Dist: astropy
17
- Requires-Dist: matplotlib
18
- Requires-Dist: numpy
19
- Requires-Dist: scipy
20
- Requires-Dist: pynufft==2020.0.0
21
- Requires-Dist: pyyaml
22
-
23
- # EMCCD Detect
24
-
25
- Given an input fluxmap, emccd_detect will return a simulated EMCCD detector image.
26
-
27
-
28
- # Version
29
-
30
- The latest version of emccd\_detect is 2.2.5.
31
-
32
-
33
- ## Getting Started
34
- ### Installing
35
-
36
- This package requires Python version 3.6 or higher. If the user wants the ability to apply charge transfer inefficiency (CTI) to detector frames using the optional tool provided in emccd\_detect, then the Python version should be >=3.6 and <=3.9.
37
-
38
- To install emccd\_detect, navigate to the emccd\_detect directory where setup.py is located and use
39
-
40
- pip install .
41
-
42
- This will install emccd\_detect and its dependencies, which are as follows:
43
-
44
- * astropy
45
- * matplotlib
46
- * numpy
47
- * scipy
48
- * pynufft==2020.0.0
49
- * pyyaml
50
-
51
- To optionally implement CTI capabilities, navigate to the arcticpy directory (<https://github.com/roman-corgi/emccd_detect/tree/master/arcticpy_folder>), and there will be a file called setup.py in that directory. Use
52
-
53
- pip install .
54
-
55
- This will install arcticpy version 1.0, which is an older version of arcticpy which runs purely on Python (<https://github.com/jkeger/arcticpy/tree/row_wise/arcticpy>). If
56
- you have Python>=3.10, the CTI functionality will not work if you are using the arcticpy installation that was included with this emccd_detect package, but everything else will work fine.
57
-
58
-
59
- ### Usage
60
-
61
- For an example of how to use emccd\_detect, see example_script.py.
62
-
63
-
64
- ## Authors
65
-
66
- * Bijan Nemati (<bijan.nemati@tellus1.com>)
67
- * Sam Miller (<sam.miller@uah.edu>)
68
- * Kevin Ludwick (<kevin.ludwick@uah.edu>)
69
-
File without changes