-
Notifications
You must be signed in to change notification settings - Fork 5
/
pg_healpix--1.0.sql
36 lines (27 loc) · 1.49 KB
/
pg_healpix--1.0.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/* pg_healpix/pg_healpix--1.0.sql */
-- complain if script is sourced in psql, rather than via CREATE EXTENSION
\echo Use "CREATE EXTENSION pg_healpix" to load this file. \quit
CREATE FUNCTION healpix_ang2ipix_nest(bigint, double precision, double precision)
RETURNS bigint
AS 'MODULE_PATHNAME', 'pgheal_ang2ipix_nest'
LANGUAGE C IMMUTABLE PARALLEL SAFE STRICT;
COMMENT ON FUNCTION healpix_ang2ipix_nest (bigint, double precision, double precision)
IS 'Function converting nside, Ra and Dec to the healpix nested ipix value';
CREATE OR REPLACE FUNCTION healpix_ang2ipix_ring(bigint, double precision, double precision)
RETURNS bigint
AS 'MODULE_PATHNAME', 'pgheal_ang2ipix_ring'
LANGUAGE C IMMUTABLE PARALLEL SAFE STRICT;
COMMENT ON FUNCTION healpix_ang2ipix_ring (bigint, double precision, double precision)
IS 'Function converting nside, Ra and Dec to the healpix ring ipix value';
CREATE OR REPLACE FUNCTION healpix_ipix2ang_nest(nside bigint, ipix bigint)
RETURNS double precision[]
AS 'MODULE_PATHNAME', 'pgheal_ipix2ang_nest'
LANGUAGE C IMMUTABLE PARALLEL SAFE STRICT;
COMMENT ON FUNCTION healpix_ipix2ang_nest(bigint, bigint)
IS 'Function converting the Healpix nested ipix value to Ra, Dec';
CREATE OR REPLACE FUNCTION healpix_ipix2ang_ring(nside bigint, ipix bigint)
RETURNS double precision[]
AS 'MODULE_PATHNAME', 'pgheal_ipix2ang_ring'
LANGUAGE C IMMUTABLE PARALLEL SAFE STRICT;
COMMENT ON FUNCTION healpix_ipix2ang_ring(bigint, bigint)
IS 'Function converting the Healpix ring ipix value to Ra, Dec';