-
Notifications
You must be signed in to change notification settings - Fork 5
DEV: created filter objects with attenuation #25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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}) | ||
|
|
||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove extra line
xpdsim/filter.py
Outdated
|
|
||
| def getAttenuation(self): | ||
| totalAttenuation = 1 | ||
| for filter in self.filter_list: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Put your print here
print('######################')
print(position_info)
print('######################')There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove this line please
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.