[AstroPy] modifying FITS data
Frédéric Grollier
fred.grollier at gmail.com
Tue May 31 12:01:20 EDT 2011
On Tue, May 31, 2011 at 04:53:55PM +0200, Jean-Luc Menut wrote:
> Hello All,
[snip]
> What I would like to do is to replace these value by some others
> (actually interpolated from other FITS data).
>
> By example, if I try to do
>
> In [80]: orig['OI_VIS'].data['VISAMP']=tuple(ones(14))
>
> I obtain:
> ValueError: field named VISAMP not found.
Hello,
doing this with a loop should work:
for i in range(orig['OS_VIS'].data.shape[0]):
orig['OI_VIS'].data.field('VISAMP')[i] = the_value
Fred.
More information about the AstroPy
mailing list