Skip to content

Commit

Permalink
Trying uv comparison with 30-m data left in Ta*. They suspiciously ma…
Browse files Browse the repository at this point in the history
…tch... need to find why still
  • Loading branch information
e-koch committed Sep 11, 2018
1 parent e3c32fb commit 77d5b4e
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 15 deletions.
14 changes: 10 additions & 4 deletions imaging/IRAM_feather_preprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,22 @@

# Open each cube and apply the Ta* -> Tmb correction

# NOTE: The uv-overlap ratio matches if this correction is NOT applied.
# If that is the case, the correction factor may need to be applied to both
# data sets.

rep_spat_cube = SpectralCube.read(iram_matched_data_path("m33.co21_iram.noema_regrid.spatial.fits"))
rep_spat_cube.allow_huge_operations=True
rep_spat_cube /= beam_eff_30m_druard
# rep_spat_cube.allow_huge_operations = True
# rep_spat_cube /= beam_eff_30m_druard
rep_spat_cube.write(iram_matched_data_path("m33.co21_iram.noema_regrid.spatial.fits"),
overwrite=True)

del rep_spat_cube

rep_cube = SpectralCube.read(iram_matched_data_path("m33.co21_iram.noema_regrid.fits"))
rep_cube.allow_huge_operations=True
rep_cube /= beam_eff_30m_druard
# rep_cube.allow_huge_operations = True
# rep_cube /= beam_eff_30m_druard
rep_cube.write(iram_matched_data_path("m33.co21_iram.noema_regrid.fits"),
overwrite=True)

del rep_cube
16 changes: 8 additions & 8 deletions imaging/line_feather.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,19 @@
from cube_analysis.feather_cubes import feather_cube


noema_cube = SpectralCube.read(noema_data_path('M33-ARM26.image.pbcor.fits'))
noema_cube = SpectralCube.read(noema_data_path('M33-ARM05_yclean.tc_final.image.pbcor.K.26regrid.fits'))
iram_cube = SpectralCube.read(iram_matched_data_path("m33.co21_iram.noema_regrid.spatial.fits"))

# Cut the IRAM cube to the extent of the NOEMA data
iram_cube = iram_cube.spectral_slab(noema_cube.spectral_extrema[0],
noema_cube.spectral_extrema[1])

# Convert the NOEMA cube to K
noema_cube = noema_cube.to(u.K)
# noema_cube = noema_cube.to(u.K)

# Also need the pb map. It is constant across the channels so grab the first
# channel
noema_pb = SpectralCube.read(noema_data_path('M33-ARM05.pb.fits'))[0]
noema_pb = SpectralCube.read(noema_data_path('yclean_05/M33-ARM05_yclean.tc_final.pb.fits'))[0]

# Define a mask that will be used to smoothly taper the IRAM data near the
# map edges. Otherwise the comparison is dominated by ringing in the Fourier
Expand All @@ -38,24 +38,24 @@

feather_cube(noema_cube, iram_cube,
verbose=True, save_feather=True,
save_name=noema_data_path('M33-ARM26.image.pbcor.feather.fits', no_check=True),
save_name=noema_data_path('M33-ARM05_yclean.tc_final.image.pbcor.K.26regrid.feather.fits', no_check=True),
num_cores=1, chunk=100,
restfreq=co21_freq,
weights=weight_arr)


# Now do the same for the 0.5 km/s data

noema_cube = SpectralCube.read(noema_data_path('M33-ARM05.image.pbcor.fits'))
noema_cube = SpectralCube.read(noema_data_path('M33-ARM05_yclean.tc_final.image.pbcor.K.fits'))
iram_cube = SpectralCube.read(iram_matched_data_path("m33.co21_iram.noema_regrid.fits"))

# Convert the NOEMA cube to K
noema_cube.allow_huge_operations = True
noema_cube = noema_cube.to(u.K)
# noema_cube.allow_huge_operations = True
# noema_cube = noema_cube.to(u.K)

feather_cube(noema_cube, iram_cube,
verbose=True, save_feather=True,
save_name=noema_data_path('M33-ARM05.image.pbcor.feather.fits', no_check=True),
save_name=noema_data_path('M33-ARM05_yclean.tc_final.image.pbcor.K.feather.fits', no_check=True),
num_cores=1, chunk=100,
restfreq=co21_freq,
weights=weight_arr)
8 changes: 5 additions & 3 deletions imaging/uv_overlap_comparison.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,11 @@
plt.close()

print("{0}+/-{1}".format(sfact, sfact_stderr))
# 0.597+/-0.019
# There's a large discrepancy between the data sets.
# The IRAM data appear to have twice the flux of NOEMA in the overlap region.
# 0.980326306378+/-0.032036255747
# There's a large discrepancy between the data sets when the Ta* -> Tmb
# conversion. Is applied to the 30-m data. The discrepancy is suspiciously
# the same as the Tmb conversion factor.
# The above ratio and saved plot do NOT have the Tmb conversion factor

# There doesn't appear to be a clear trend with radius, but let's just check

Expand Down

0 comments on commit 77d5b4e

Please sign in to comment.