-
Notifications
You must be signed in to change notification settings - Fork 21
Added documentation for slicing data cubes #52
Conversation
|
||
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. |
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.
Could you wrap the text at 79 characters? (most code editors can do this).
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.
(same elsewhere in this file)
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.
Ah I actually removed that warning from my text editor because it started to bother me. I'll change this.
@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 |
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.
I think here it should be 'the second dimension on the x-axis, and the third dimension on the y-axis'?
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.
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?
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.
Oh right, I accidentally wrote slices=(50, 'x', 'y')
instead of slices=(50, 'y', 'x')
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.
Ah, this makes more sense :)
Once my two small comments have been addressed, this is ready to merge - thanks @anizami! |
@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 |
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.
@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.
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.
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. | ||
|
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.
@astrofrog - is this okay?
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.
Looks great!
Added documentation for slicing data cubes
thanks! :) |
Added documentation for slicing data cubes
No description provided.