-1

だから私は、APLpyを使用してDS9領域ファイルによって提供されるいくつかの注釈を使用して、画像に適合するようにプロットしようとしています(同一の適合画像):

私のスクリプトは次のとおりです。

import aplpy

import matplotlib
import matplotlib.pyplot as pyplot
import matplotlib.gridspec as gridspec

from astropy.io import fits

matplotlib.rc('xtick', labelsize=8)
matplotlib.rc('ytick', labelsize=8)
#matplotlib.rc('text', usetex=True)
#matplotlib.rcParams['xtick.direction'] = 'out'
#matplotlib.rcParams['ytick.direction'] = 'out'
matplotlib.rcParams['grid.alpha'] = 0.3

nullfmt = pyplot.NullFormatter()

fig = pyplot.figure(figsize=(26,12))

gridspec_layout = gridspec.GridSpec(1,2)
#gridspec_layout.update(hspace=0.0, wspace=0.005)

M33_galax = aplpy.FITSFigure('/Users/.../SDSS_g_c_rescale.fits', figure=fig, subplot=list(gridspec_layout[0].get_position(fig).bounds), dimensions=[0, 1], slices=[0])
M33_stars = aplpy.FITSFigure('/Users/.../SDSS_g_c_rescale.fits', figure=fig, subplot=list(gridspec_layout[1].get_position(fig).bounds), dimensions=[0, 1], slices=[0])
#dimensions=[0, 1], slices=[1]

M33_galax.show_regions('SDSS_galaxy_match.reg')
#M33_stars.show_regions('')

M33_galax.set_tick_labels_format(xformat='hh:mm:ss.ss',yformat='dd:mm:ss')
M33_galax.set_tick_labels_font(size='x-small')
M33_galax.axis_labels.set_ytext(r'$\delta\,,\mathrm{Dec}\,\mathrm{(J2000)}$')
M33_galax.axis_labels.set_xtext(r'$\alpha\,,\mathrm{RA}\,\mathrm{(J2000)}$')
M33_galax.axis_labels.set_font(size='small')
M33_galax.axis_labels.set_ypad(10)
M33_galax.axis_labels.set_xpad(10)
M33_galax.add_grid()
M33_galax.grid.set_alpha(0.1)

M33_stars.set_tick_labels_format(xformat='hh:mm:ss.ss',yformat='dd:mm:ss')
M33_stars.set_tick_labels_font(size='x-small')
M33_stars.axis_labels.set_ytext(r'$\delta\,,\mathrm{Dec}\,\mathrm{(J2000)}$')
M33_stars.axis_labels.set_xtext(r'$\alpha\,,\mathrm{RA}\,\mathrm{(J2000)}$')
M33_stars.axis_labels.set_font(size='small')
M33_stars.axis_labels.set_ypad(10)
M33_stars.axis_labels.set_xpad(10)
M33_stars.add_grid()
M33_stars.grid.set_alpha(0.1)

pyplot.show()

ただし、出力は次のとおりです。

ここに画像の説明を入力

これでどこが間違っているのか誰にもわかりますか?

4

1 に答える 1

1

show_grayscale画像を使用または表示する必要がありshow_colorscaleます。たとえば、次のようになります。

M33_galax.show_grayscale()
于 2016-07-28T06:28:45.050 に答える