DEV: created filter objects with attenuation#25
DEV: created filter objects with attenuation#25brookeferber wants to merge 22 commits intoxpdAcq:masterfrom
Conversation
| class Filter(be.Mover): | ||
| def __init__(self, name, fields, initial_set, attenuation, **kwargs): | ||
| self.attenuation = attenuation | ||
| super().__init__(name, fields, initial_set, **kwargs) |
There was a problem hiding this comment.
Need empty line at the end of the file.
xpdsim/movers.py
Outdated
| shctl1 = be.Mover('shctl1', {'rad': lambda x: x}, {'x': 0}) | ||
| cs700 = be.Mover('cs700', {'temperature': lambda x: x}, {'x': 300}) | ||
|
|
||
|
|
xpdsim/filter.py
Outdated
|
|
||
| def getAttenuation(self): | ||
| totalAttenuation = 1 | ||
| for filter in self.filter_list: |
There was a problem hiding this comment.
you should use something other than filter for the name, it is a python built in.
xpdsim/filter.py
Outdated
| self.filter_list.append(f) | ||
| setattr(self, k, f) | ||
|
|
||
| def getAttenuation(self): |
There was a problem hiding this comment.
Methods are lower case with underscores as spaces.
xpdsim/filter.py
Outdated
| return totalAttenuation | ||
|
|
||
|
|
||
| class Filter(be.Mover): |
There was a problem hiding this comment.
To avoid conflicts and confusion, can we change everywhere "filter" to either xrayfilter or beamfilter. Not sure which is better.
S
xpdsim/filter.py
Outdated
| print(self.read) | ||
| ########################################### | ||
| position_info = self.read() | ||
| if (position_info.get('x') == 0): |
There was a problem hiding this comment.
Put your print here
print('######################')
print(position_info)
print('######################')There was a problem hiding this comment.
Ok! I'll do that now. Thank you.
xpdsim/dets.py
Outdated
| imgs = ImageSequence(os.path.join(path, '*.tif*'), dtype=np.float64) | ||
| else: | ||
| imgs = [np.ones(path)] | ||
| imgs = ImageSequence(os.path.join(path, '*.tif*'), dtype=np.float64) |
Codecov Report
@@ Coverage Diff @@
## master #25 +/- ##
==========================================
+ Coverage 93.54% 97.26% +3.71%
==========================================
Files 6 8 +2
Lines 155 219 +64
==========================================
+ Hits 145 213 +68
+ Misses 10 6 -4
Continue to review full report at Codecov.
|
No description provided.