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
Add an electron unit #2599
Add an electron unit #2599
Conversation
I wondered whether one couldn't use |
Should |
Would it be worth including an equivalency with electric charge and such? |
I don't think so, because this means electron as a count rather than its physical properties. |
👍 from me. As an aside, we may want to also propose this to the VOUnit working group for inclusion in the standardization effort so other tools can read/write this unit. |
Thinking more about the events category, I think I'd just remove the category and stuff both |
In this case it does, but you could definitely take a count of electrons and convert it to charge. But that doesn't make any sense in the case of a detector or anything where there's a time dependence. In other words, given a charge you could convert it to a rough number of electrons. Just a thought though--I know that doesn't really relate to the original purpose of this. |
I'm working with data from photomultipliers and there the term But I agree plain |
One of the travis-ci builds needs to be re-started. |
To collate all of the comments so far:
|
Yes, I would like |
It seems to me that the name |
@crawfordsm -- any strong opinions on this? It seems like |
Electron is far more appropriate as that is what is actually being read out. The voltage measured on the device is being converted to number of electrons and that is what is recorded. Photoelectron would assume that all of your electrons are due to the photoelectric effect. But since many devices (especially photomultiplier tubes and warm CCDs) have a dark current, some of the electrons are due to thermal effects and not photons. So it is actually more accurate to use electrons than photoelectrons and they are not strictly interchangeable. I'm not sure if I know of any reason that |
OK ... 👍 to Actually with the current implementation is |
Ok -- thanks for the detailed response. That's all making sense now that maybe |
👍 |
I think By the way, why should it be made equivalent to a charge and not a mass? In fact, it could be made equivalent to both via equivalencies. E.g. |
Agreed to handle conversions via equivalencies (which can be added later). In the present context, the main use would seem exactly that the unit is an island unit, and that, therefore, you will have to divide by something like Typing the above reminds me: I would add |
Ended up adding the formatting but not making any other changes... |
@mwcraig - can you add a changelog entry? (we can sneak it in to 0.4) |
This is used heavily in ccdproc; having it in core astropy would be convenient
Done - getting it into 0.4 would be great! |
This is used heavily in ccdproc; having it in core astropy would be convenient. Right now some CCD-related units are in astropy (e.g.
u.adu
) but electron ends up beingccdproc.electron
.ccdproc already registers
electron
withu.add_enabled_units
, so the only time this comes up at all is creating aQuantity
by doing something likeq = 3 * ccdproc.electron
. The lengthier formq = u.Quantity(3, "electron")
works.This may well be something fixable on the ccdproc side -- if so, please let me know.