Skip to content

Re-order documentation for astropy.units - #1591

Merged
mdboom merged 4 commits into
astropy:masterfrom
mdboom:unit/reorganize-docs-to-emphasise-quantity
Oct 23, 2013
Merged

mdboom merged 4 commits into
astropy:masterfrom
mdboom:unit/reorganize-docs-to-emphasise-quantity

Conversation

@mdboom

@mdboom mdboom commented Oct 21, 2013

Copy link
Copy Markdown
Contributor

I've come across several users who have read the start of the docs for astropy.units and use the original API which involved finding the conversion factor with pure units, then multiplying numbers, rather than using Quantities. I think that we should consider re-ordering the 'getting started' section to start straight with quantities, and then show the pure unit stuff later since it's not as useful now we have Quantity.

@mdboom - what do you think?

@mhvk

mhvk commented Oct 17, 2013

Copy link
Copy Markdown
Contributor

@astrofrog - we're of t̶w̶o̶ one mind (see #1577 (comment))! Though my initial solution would have been to move the quantity part to its own subsection in the master index. But I like your suggestion better: start straight with 15 * u.m / u.s; in that case, just rename the section "Quantities and Units"?

@astrofrog

Copy link
Copy Markdown
Member Author

@mhvk - your last suggestion sounds good - at the end of the day I agree the Quantity and Unit stuff should live together and I like the title you suggest.

@eteq

eteq commented Oct 17, 2013

Copy link
Copy Markdown
Member

See the overlap with #1595 - if we do that, this is not necessary because it would have it's own doc section.

I do not think we should give it it's own section in the doc (as @mhvk originally suggested) unless it has its own subpackage. But I'm also fine with @mhvk's suggestion here to actually put the quantity stuff before the units stuff in the docs (and more prominent in the examples). So now that I see this, I'm actually slightly more in favor of this over #1595.

@astrofrog

Copy link
Copy Markdown
Member Author

I'm also not too keen on actually separating units and quantity, so I also prefer the solution I suggested here.

@ghost ghost assigned mdboom Oct 18, 2013
@mdboom

mdboom commented Oct 18, 2013

Copy link
Copy Markdown
Contributor

Self assigning. I'll do this work early next week.

@mdboom

mdboom commented Oct 21, 2013

Copy link
Copy Markdown
Contributor

Reorganization of units document to emphasize Quantity is attached.

It primarily:

  1. Presents Quantities first
  2. Updates many of the examples demonstrating unit concepts using quantities
  3. Removes some now incorrect documentation about the Quantity conversion convenience members (i.e. q.parsec).

This requires #1610 to be merged as well, as it documents a feature there.

Comment thread docs/units/quantity.rst Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd think this would typically be used more when there are different units. Maybe replace by the following?
``

qlst = [60. * u.s, 1. * u.hr]

@mhvk

mhvk commented Oct 22, 2013

Copy link
Copy Markdown
Contributor

I went through all the files and it looks good.

Apart from the simple comment above, maybe for the cds format mention that it underlies every table that one can get from Vizier [1] -- maybe more relevant than that it was used in early votable definitions!

[1] http://vizier.u-strasbg.fr/

@mdboom

mdboom commented Oct 22, 2013

Copy link
Copy Markdown
Contributor

I have addressed @mhvk's comments and (hopefully) fixed the Travis errors.

@astrofrog

Copy link
Copy Markdown
Member Author

👍

@mdboom mdboom mentioned this pull request Oct 22, 2013
mdboom added a commit that referenced this pull request Oct 23, 2013
…e-quantity

Re-order documentation for astropy.units
@mdboom
mdboom merged commit fa82601 into astropy:master Oct 23, 2013
@mdboom
mdboom deleted the unit/reorganize-docs-to-emphasise-quantity branch May 21, 2014 23:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants