Repository navigation
Create documentation page for astropy.constants - #540
Conversation
|
It might be cool to auto-generate a table of the available constants, as is currently done for units. See |
|
The docstring for |
|
+1 on the autogenerating idea. I can look into that if you'd rather focus on the narrative docs, @astrofrog |
|
@eteq - ok, feel free to do that! |
|
@eteq - I've added an initial narrative. There are already tables appearing (this was actually implemented in the module docstring before, so this is not something I added). However, we might want to make it more similar to |
|
Actually, I think it's ok - I had a closer look at how these docstrings are generated and it seems fine for now. It would make sense to do this consistently the same way |
|
Reading over the docs did make me realize an oddity about the way the package is currently working, though. Right now, it's possible to do So this begs the question: why don't we just do ? I think someone mentioned this and I was actually under the impression that that's what we'd settled on doing, but I can see from the docstring here that there's significant potential for confusion. if we have two very different (easy) ways to convert between si and cgs. |
|
The main reason I can think of is that while you can do |
|
@astrofrog - I'm continuing the discussion below but I understand if you want to move it elsewhere because it's more about the package itself than the documentation. If you prefer, I could open up a PR to change it to what I was thinking, and then we can discuss it there. I guess what I realized after reading these docs is that it's confusing and unexpected to have to do That seems just as convenient and unambiguous, and is more consistent with the fact that all other That said, I admit I have no solution to the problem of that annoying 4pi for the E&M units. |
|
@eteq - I agree that your suggestion is better (I'm fine with discussing it here). Let's think a bit more about the E&M units to see if we can find a clean solution. Maybe |
|
Hmm... what about adding a unit equivalency? You could implement it as a private function in |
|
True, we could use equivalencies. @mdboom - do you have any thoughts about this? |
|
A couple of options I thought of last night:
|
|
@eteq: To answer the question: It seems like using equivalencies would work, but I worry about the implicitness of that approach being too confusing. I think I prefer @astrofrog's overnight suggestions immediately above better... |
|
Whoops, I thought I commented on this days ago, but I'm just realizing now it never appeared. I'm ok with either of @astrofrog's sugestions, although I think I slightly favor |
|
See the mailing list for some more related discussion. I'm mildly in favor of keeping the status quo, with the justification that in |
|
I am planning to merge this (as discussed in #572) unless there are any objections. It describes the current behavior, and we an always update it if we change the API. |
Create documentation page for astropy.constants
Create documentation page for astropy.constants
Create documentation page for astropy.constants
Add Brett Morris as maintainer for `astropy.nddata`
Once #529 is merged, I will create a documentation page for
astropy.constants.