Skip to content
This repository has been archived by the owner on Jun 16, 2018. It is now read-only.

Added documentation for slicing data cubes #52

Merged
merged 7 commits into from
Jun 20, 2014

Conversation

anizami
Copy link
Collaborator

@anizami anizami commented Jun 18, 2014

No description provided.


hdu.header

By setting ``slices=(50, 'x', 'y')``, we have chosen to plot the second dimension on the y-axis and the third dimension on the x-axis. Even though we are not plotting the all the dimensions, we have to specify which slices to select for the dimensions that are not shown. In this example, we are not plotting the first dimension so we have selected the slice 50 to display. You can experiment with this by changing the selected slice and looking at how the plotted image changes.
Copy link
Owner

Choose a reason for hiding this comment

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

Could you wrap the text at 79 characters? (most code editors can do this).

Copy link
Owner

Choose a reason for hiding this comment

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

(same elsewhere in this file)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ah I actually removed that warning from my text editor because it started to bother me. I'll change this.

@anizami
Copy link
Collaborator Author

anizami commented Jun 20, 2014

@astrofrog - I've made all the changes I could think of right now to the docs. Do you have any suggestions for adding things?



By setting ``slices=(50, 'x', 'y')``, we have chosen to plot the second
dimension on the y-axis and the third dimension on the x-axis. Even though we
Copy link
Owner

Choose a reason for hiding this comment

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

I think here it should be 'the second dimension on the x-axis, and the third dimension on the y-axis'?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The second dimension is the declination and the third dimension is the velocity, so haven't they been plotted on the y and x axis respectively?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Oh right, I accidentally wrote slices=(50, 'x', 'y') instead of slices=(50, 'y', 'x')

Copy link
Owner

Choose a reason for hiding this comment

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

Ah, this makes more sense :)

@astrofrog
Copy link
Owner

Once my two small comments have been addressed, this is ready to merge - thanks @anizami!

@anizami
Copy link
Collaborator Author

anizami commented Jun 20, 2014

@astrofrog - fixed the typo and wrapped the text at 79 characters :)

This is a three-dimensional dataset which you can check by looking at the
header information by::

hdu.header
Copy link
Owner

Choose a reason for hiding this comment

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

@anizami - sorry, just one more comment - here, maybe you can put:

>>> hdu.header
NAXIS =                3
...

basically just show the first few lines of the output of the header, enough to see it's 3-d and the dimensions.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

No problem

...

The header keyword 'NAXIS' gives the number of dimensions of the dataset. The keywords 'CTYPE1', 'CTYPE2' and 'CTYPE3' give the data type of these dimensions to be right ascension, declination and velocity respectively.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@astrofrog - is this okay?

Copy link
Owner

Choose a reason for hiding this comment

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

Looks great!

astrofrog added a commit that referenced this pull request Jun 20, 2014
Added documentation for slicing data cubes
@astrofrog astrofrog merged commit ffbc7e5 into astrofrog:master Jun 20, 2014
@anizami
Copy link
Collaborator Author

anizami commented Jun 20, 2014

thanks! :)

@anizami anizami deleted the add-docs branch June 20, 2014 10:41
astrofrog added a commit that referenced this pull request Nov 28, 2016
Added documentation for slicing data cubes
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants