astropy

    3熱度

    3回答

    我想在astropy庫中使用Ellipse2D模型擬合一個橢圓。適合不起作用。建模參數與初始參數相同(可能除幅度參數外)。請參見下面的代碼: import numpy as np from astropy.modeling import models, fitting import matplotlib.pyplot as pl # fake data num = 100 x, y =

    0熱度

    2回答

    我試圖用寫一個字符串和一個浮動到一個文件: t=['SDSS J2000'] data=[10] astropy.io.ascii.write([t,data] ,'data.dat',names=['name','num'],formats={'name':'%s','num':'%f'}) 輸出文件: name num "SDSS J2000" 10.000000 如何我可以寫字

    3熱度

    1回答

    我打開一個完整的地圖 from astropy.io import fits from astropy.wcs import wcs mapheader = fits.getheader(MapFile, 0) mapdata = fits.getdata(MapFile, 0) w = wcs.WCS(mapheader) 和我從它 假設度 中心位於RA,DEC這可以通過使用Cut

    3熱度

    2回答

    我試圖獲得使用Simbad類從astroquery所有幀座標,就像它是在SIMBAD web page (基本數據部分)顯示 我有以下代碼: from astroquery.simbad import Simbad def get(): Simbad.reset_votable_fields() Simbad.remove_votable_fields('coordinat

    -1熱度

    1回答

    import numpy as np import astropy as ap def mass(FWHM, lumi): abs_lumi = bhm.L_1450(lumi) s1 = (FWHM/1000) s2 = ((abs_lumi)/(10**44)) s = [(s1**2)*(s2**0.53)] #mass = np.lo

    -1熱度

    1回答

    適合files (不必登錄,繼續查看和下載)。 不相關,據我可以告訴(糾正我,如果我錯了): Find physical coordinates of a pixel in a fits file with python 重現: from astropy.io import fits from astropy.wcs import WCS ev=fits.open('sw00032188013

    1熱度

    1回答

    嘗試保存astropy使用astroquery檢索到FITS文件時出現錯誤。在某些情況下,它抱怨一些關鍵字的描述太長。 writeto()函數似乎有一個output_verify參數來避免這種問題,但我無法找到如何將它傳遞給write()函數?它存在嗎? 這裏是我的代碼: import astropy.units as u from astroquery.vizier import Vizier

    2熱度

    2回答

    我想有一個本地(離線)ASCII版本的UCAC4明星目錄爲了有一個孤立的工作環境。 我有問題試圖檢索此特定完整目錄。下載小部件非常簡單,使用topcatVO-> Vizier服務選項甚至是CdS Web界面,但我沒有管理完整的目錄檢索。 我最好的拍攝是用Python腳本astroquery但下面的函數調用不返回遠遠不夠的星星時,它應該下載一半的目錄(天球北部的部分): ucac4 = v.quer

    0熱度

    1回答

    我正在尋找一種方法在IPython筆記本中的LaTeX字符串內呈現astropy變量。通過簡單地在IPython的提示鍵入它 :例如,給定一個簡單的前提, from astropy.constants import c import astropy.units as u from astropy import log 光速精美缺省呈現爲。現在,如果我想將它嵌入到字符串中呢?如何在已經被as

    2熱度

    2回答

    我目前正在使用一些適合表格,並且在輸出Astropy.io.fits時遇到了問題。從本質上講,我正在切出一大堆有我不感興趣的對象數據的行,但是當我保存新表時,所有這些行都已經奇蹟般的重現了。 例如: import astropy.io.fits as fits import numpy as np hdu = fits.open('some_fits_file.fits')[1].data