Blending Realistic Synthetic Observations in a Real BackgroundΒΆ
Once your 2D FC_object is a member of SyntheticImage
(due to the fluxcompensator.cube.SyntheticCube.convolve_filter()
in the pipeline), you can combine it with a real observation (e.g. file.fits
). To add your realistic syntetic observation to a real observation and store it in a fits file, add to your script:
# combine FC_object.val (2D) with a real observation
FC_object.add_to_observation(fits_file='file.fits', name='add_model',
position_pix=[16., 32.], position_world=None,
zero_edges=None)
The output file add_model.fits
will be stored in the same directory where the script runs. The parametes
position_pix
:list
with [x, y] postion of the modelFC_object.val
center in pixel coordinates in the observationsfile.fits
position_world
:list
with [x, y ] postion of the modelFC_object.val
center in world coordinates in the observationsfile.fits
. Only needed ifposition_pix = None
.zero_edges
: IfTrue
edges of modelFC_object.val
are normalized to zero at the rim before adding to the observationsfile.fits
.