Skip to content

Commit

Permalink
kaplibs: Do not specifiy uncertainty in convex hull
Browse files Browse the repository at this point in the history
The recent changes to AST regarding simplification of Polygons means that
it is no longer necessary to specify an uncertainty in the outline
polygon. Previously, bending of the polygon edges caused by the
non-linear mapping from pixel coords to sky coords caused the
simplification of the Polygon to fail, and so prevent it being converted
to STC-S format.
  • Loading branch information
David Berry committed Feb 25, 2014
1 parent 116ef06 commit 28083b8
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions libraries/kaplibs/kpg/kpgPutOutline.c
Expand Up @@ -102,7 +102,6 @@ void kpgPutOutline( int indf, float wlim, int convex, int *status ){


/* Local Variables: */
AstCircle *unc;
AstFrame *frm2d;
AstFrameSet *wcs;
AstMapping *map2d;
Expand All @@ -114,7 +113,6 @@ void kpgPutOutline( int indf, float wlim, int convex, int *status ){
char xtype[10];
const double *data;
const double *p0;
double centre[ 2 ];
double radius;
int *data_2d = NULL;
int *p1;
Expand Down Expand Up @@ -251,18 +249,8 @@ void kpgPutOutline( int indf, float wlim, int convex, int *status ){
"data in '^N' because no good values were found.", status );
}

/* Assign some uncertainty in each vertex position. Without this fuzzyness,
the conversion from AST to STC-S fails because the polygon is defined
in pixel coordinates and is distorted too much by conversion to sky
coordinates. */
} else {
centre[ 0 ] = 0.0;
centre[ 1 ] = 0.0;
radius = ACC;
astSetUnc( poly, astCircle( astFrame( 2, "Domain=PIXEL" ), 1, centre,
&radius, NULL, " " ) );

/* Map the above polygon from GRID coords into the current WCS Frame. */
} else {
region = astMapRegion( poly, map2d, frm2d );

/* Create an StcsChan that can be used to convert the AST Region into an
Expand Down

0 comments on commit 28083b8

Please sign in to comment.