double tan_get_orientation(const tan_t* tan) { double T, A, orient; double det, parity; det = tan_det_cd(tan); parity = (det >= 0 ? 1.0 : -1.0); T = parity * tan->cd[0][0] + tan->cd[1][1]; A = parity * tan->cd[1][0] - tan->cd[0][1]; orient = -rad2deg(atan2(A, T)); return orient; }
double tpv_det_cd(const tpv_t* tpv) { return tan_det_cd(&(tpv->wcstan)); }
double tan_pixel_scale(const tan_t* tan) { double scale = deg2arcsec(sqrt(fabs(tan_det_cd(tan)))); return scale; }
double sip_det_cd(const sip_t* sip) { return tan_det_cd(&(sip->wcstan)); }