Skip to content

Comments

Added initial tutorial#4

Open
kirstenhall wants to merge 1 commit intoSmithsonian:mainfrom
kirstenhall:flux-extraction
Open

Added initial tutorial#4
kirstenhall wants to merge 1 commit intoSmithsonian:mainfrom
kirstenhall:flux-extraction

Conversation

@kirstenhall
Copy link
Collaborator

first draft of point source flux extraction, extended source flux determination ongoing

first draft of point source flux extraction, extended source flux determination ongoing
@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@kirstenhall kirstenhall marked this pull request as ready for review July 5, 2024 16:23
@jdenbrok jdenbrok self-assigned this Jul 15, 2024
@@ -0,0 +1,634 @@
{
Copy link

@gwoolf gwoolf Jul 16, 2024

Choose a reason for hiding this comment

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

When building getbeam(), it could be useful to explain what the returned information is and how it will later be used. This is so that a user can better manipulate this data for other models in the future.

Karto explained that when an image is decomposed from the synthesized beam, the cleaned map is convolved with a fitted Gaussian model, which is defined by these parameters.


Reply via ReviewNB

@@ -0,0 +1,634 @@
{
Copy link

@gwoolf gwoolf Jul 16, 2024

Choose a reason for hiding this comment

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

When building this 2D array, it could be useful to explain its function within the tutorial. This is so that the user can edit the internal parameters to fit their own use cases.

Karto explained that the 2D array allows us to easily mask out regions in the process of calculating the signal RMS, which is used in later steps.


Reply via ReviewNB

@@ -0,0 +1,634 @@
{
Copy link

@gwoolf gwoolf Jul 16, 2024

Choose a reason for hiding this comment

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

Once this Gaussian information is calculated, it should be explained where to find the beam width it is compared against in order to make a final conclusion on the data.


Reply via ReviewNB

@@ -0,0 +1,634 @@
{
Copy link

@gwoolf gwoolf Jul 16, 2024

Choose a reason for hiding this comment

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

When a source is found to be partially resolved, it would be useful to clarify where to find the tutorial on the ensuing process steps.


Reply via ReviewNB

@@ -0,0 +1,634 @@
{
Copy link

@gwoolf gwoolf Jul 24, 2024

Choose a reason for hiding this comment

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

The multipication of line 1 by u.Hz can lead to an issue where the frequency is off by a factor of 10^9. Should this be changed to multiplication by u.GHz?


Reply via ReviewNB

@@ -0,0 +1,634 @@
{
Copy link
Collaborator

@jdenbrok jdenbrok Jul 29, 2024

Choose a reason for hiding this comment

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

  • fluxes from SMA (and other interferometric data) -> fluxes from SMA (and other interferometric*)* data
  • I would consider removing the "#" after the (sub)titles?


Reply via ReviewNB

@@ -0,0 +1,634 @@
{
Copy link
Collaborator

@jdenbrok jdenbrok Jul 29, 2024

Choose a reason for hiding this comment

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

I think the step to correct bpa in case it's negative is not necessary, since models.Gaussian2D can handle negative angles as well, right?


Reply via ReviewNB

@@ -0,0 +1,634 @@
{
Copy link
Collaborator

@jdenbrok jdenbrok Jul 29, 2024

Choose a reason for hiding this comment

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

Another alternative would be to see if the RESTFRQ key is defined. Using that might be better, since (i) with CRVAL3, one doesn't necessarily know if it's the first, last, or middle channel, that it's referring to (to determine that we would need to look at CRPIX3) and (ii) in the case of 2D data, it also might be that there is no CRVAL3 defined to begin with


Reply via ReviewNB

@@ -0,0 +1,634 @@
{
Copy link
Collaborator

@jdenbrok jdenbrok Jul 29, 2024

Choose a reason for hiding this comment

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

I would consider also showing the aperture location in the figure (as this is usefull as a diagnostic plot to see if everything works):

plt.imshow(data_array)
ap_patches = aperture.plot(color='white', lw=2)

Reply via ReviewNB

@@ -0,0 +1,634 @@
{
Copy link
Collaborator

@jdenbrok jdenbrok Jul 29, 2024

Choose a reason for hiding this comment

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

Line #1.    data_array = hdu.data[0][0]

I would not here that this only works if 4 axes are defined. It might however happen, that only 3 or 2 axes are defined, since we are dealing with 2D data. Therefore, I would consider pointing either out that this lines needs to be adjusted, if your data has only 2 or 3 axes, or you could somewhere before check how many axes your data has (naxis = hdu.hdr['NAXIS']) and then based on that adjust here line 1


Reply via ReviewNB

@@ -0,0 +1,634 @@
{
Copy link
Collaborator

@jdenbrok jdenbrok Jul 29, 2024

Choose a reason for hiding this comment

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

Line #3.    aperture = CircularAnnulus((int(maxloc[0]),int(maxloc[1])), r_in=30, r_out=50)

I think it should be (int(maxloc[*1*]),int(maxloc[*0*]))


Reply via ReviewNB

@@ -0,0 +1,634 @@
{
Copy link
Collaborator

@jdenbrok jdenbrok Jul 29, 2024

Choose a reason for hiding this comment

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

When you print this here, suggest to add information on what exactly it is printing:

print("major-axis: %.2f px/beam vs. fitted result: %.2f px/beam"%(beam[0]/cdelt,Fit_params[2]))

print("minor-axis: %.2f px/beam vs. fitted result: %.2f px/beam"%(beam[1]/cdelt,Fit_params[3]))

Reply via ReviewNB

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants