head	8.7;
access;
symbols;
locks; strict;
comment	@ * @;


8.7
date	2026.05.11.12.01.10;	author mcalabre;	state Exp;
branches;
next	8.6;

8.6
date	2026.03.29.13.53.56;	author mcalabre;	state Exp;
branches
	8.6.1.1;
next	8.5;

8.5
date	2025.12.06.13.47.41;	author mcalabre;	state Exp;
branches
	8.5.1.1;
next	8.4;

8.4
date	2024.10.28.13.56.16;	author mcalabre;	state Exp;
branches
	8.4.1.1;
next	8.3;

8.3
date	2024.05.13.16.33.00;	author mcalabre;	state Exp;
branches
	8.3.1.1;
next	8.2;

8.2
date	2023.11.16.10.00.29;	author mcalabre;	state Exp;
branches
	8.2.1.1;
next	8.1;

8.1
date	2023.07.05.17.12.07;	author mcalabre;	state Exp;
branches
	8.1.1.1;
next	8.0;

8.0
date	2023.07.01.06.15.04;	author mcalabre;	state Exp;
branches
	8.0.1.1;
next	7.13;

7.13
date	2022.10.07.03.43.35;	author mcalabre;	state Exp;
branches
	7.13.1.1;
next	7.12;

7.12
date	2022.09.09.04.57.58;	author mcalabre;	state Exp;
branches
	7.12.1.1;
next	7.11;

7.11
date	2022.04.26.06.13.52;	author mcalabre;	state Exp;
branches
	7.11.1.1;
next	7.10;

7.10
date	2022.04.23.14.25.15;	author mcalabre;	state Exp;
branches
	7.10.1.1;
next	7.9;

7.9
date	2022.03.25.15.14.48;	author mcalabre;	state Exp;
branches
	7.9.1.1;
next	7.8;

7.8
date	2022.03.25.06.11.49;	author mcalabre;	state Exp;
branches
	7.8.1.1;
next	7.7;

7.7
date	2021.07.12.06.36.49;	author mcalabre;	state Exp;
branches
	7.7.1.1;
next	7.6;

7.6
date	2021.04.13.12.57.01;	author mcalabre;	state Exp;
branches
	7.6.1.1;
next	7.5;

7.5
date	2021.03.20.05.54.58;	author mcalabre;	state Exp;
branches
	7.5.1.1;
next	7.4;

7.4
date	2021.01.31.02.24.51;	author mcalabre;	state Exp;
branches
	7.4.1.1;
next	7.3;

7.3
date	2020.06.03.03.37.02;	author mcalabre;	state Exp;
branches
	7.3.1.1;
next	7.2;

7.2
date	2020.03.09.07.31.23;	author mcalabre;	state Exp;
branches
	7.2.1.1;
next	7.1;

7.1
date	2019.12.31.13.25.19;	author mcalabre;	state Exp;
branches
	7.1.1.1;
next	6.4;

6.4
date	2019.08.15.09.30.18;	author mcalabre;	state Exp;
branches
	6.4.1.1;
next	6.3;

6.3
date	2019.07.12.07.33.39;	author mcalabre;	state Exp;
branches
	6.3.1.1;
next	6.2;

6.2
date	2018.10.20.10.03.13;	author mcalabre;	state Exp;
branches
	6.2.1.1;
next	6.1;

6.1
date	2018.10.19.08.35.17;	author mcalabre;	state Exp;
branches
	6.1.1.1;
next	5.20;

5.20
date	2018.10.05.05.32.41;	author mcalabre;	state Exp;
branches
	5.20.1.1;
next	5.19;

5.19
date	2018.07.26.15.37.04;	author mcalabre;	state Exp;
branches
	5.19.1.1;
next	5.18;

5.18
date	2018.01.10.08.32.14;	author mcalabre;	state Exp;
branches
	5.18.1.1;
next	5.17;

5.17
date	2017.09.18.08.44.23;	author mcalabre;	state Exp;
branches
	5.17.1.1;
next	5.16;

5.16
date	2017.01.15.04.25.01;	author mcalabre;	state Exp;
branches
	5.16.1.1;
next	5.15;

5.15
date	2016.04.05.12.55.10;	author mcalabre;	state Exp;
branches
	5.15.1.1;
next	5.14;

5.14
date	2016.02.07.10.49.31;	author mcalabre;	state Exp;
branches
	5.14.1.1;
next	5.13;

5.13
date	2016.01.26.08.51.13;	author mcalabre;	state Exp;
branches
	5.13.1.1;
next	5.12;

5.12
date	2015.11.15.02.13.00;	author mcalabre;	state Exp;
branches
	5.12.1.1;
next	5.11;

5.11
date	2015.10.18.09.13.05;	author mcalabre;	state Exp;
branches
	5.11.1.1;
next	5.10;

5.10
date	2015.10.09.08.19.15;	author mcalabre;	state Exp;
branches
	5.10.1.1;
next	5.9;

5.9
date	2015.07.21.09.20.01;	author mcalabre;	state Exp;
branches
	5.9.1.1;
next	5.8;

5.8
date	2015.07.08.11.03.59;	author mcalabre;	state Exp;
branches
	5.8.1.1;
next	5.7;

5.7
date	2015.06.29.02.44.16;	author mcalabre;	state Exp;
branches
	5.7.1.1;
next	5.6;

5.6
date	2015.06.14.07.11.24;	author mcalabre;	state Exp;
branches
	5.6.1.1;
next	5.5;

5.5
date	2015.05.05.13.16.31;	author mcalabre;	state Exp;
branches
	5.5.1.1;
next	5.4;

5.4
date	2015.04.21.14.41.05;	author mcalabre;	state Exp;
branches
	5.4.1.1;
next	5.3;

5.3
date	2015.04.21.02.50.51;	author mcalabre;	state Exp;
branches
	5.3.1.1;
next	5.2;

5.2
date	2015.04.15.12.35.07;	author mcalabre;	state Exp;
branches
	5.2.1.1;
next	5.1;

5.1
date	2015.04.07.10.56.36;	author mcalabre;	state Exp;
branches
	5.1.1.1;
next	5.0;

5.0
date	2015.04.05.12.24.59;	author mcalabre;	state Exp;
branches
	5.0.1.1;
next	4.25;

4.25
date	2014.12.14.14.29.36;	author mcalabre;	state Exp;
branches
	4.25.1.1;
next	4.24;

4.24
date	2014.09.18.15.25.00;	author mcalabre;	state Exp;
branches
	4.24.1.1;
next	4.23;

4.23
date	2014.05.13.05.50.51;	author mcalabre;	state Exp;
branches
	4.23.1.1;
next	4.22;

4.22
date	2014.04.12.15.03.52;	author mcalabre;	state Exp;
branches
	4.22.1.1;
next	4.21;

4.21
date	2014.03.24.05.12.27;	author mcalabre;	state Exp;
branches
	4.21.1.1;
next	4.20;

4.20
date	2013.12.18.05.42.49;	author mcalabre;	state Exp;
branches
	4.20.1.1;
next	4.19;

4.19
date	2013.09.29.14.17.51;	author mcalabre;	state Exp;
branches
	4.19.1.1;
next	4.18;

4.18
date	2013.07.13.10.00.04;	author mcalabre;	state Exp;
branches
	4.18.1.1;
next	4.17;

4.17
date	2013.01.29.05.29.20;	author cal103;	state Exp;
branches
	4.17.1.1;
next	4.16;

4.16
date	2012.11.07.04.42.44;	author cal103;	state Exp;
branches
	4.16.1.1;
next	4.15;

4.15
date	2012.09.26.14.26.05;	author cal103;	state Exp;
branches
	4.15.1.1;
next	4.14;

4.14
date	2012.07.13.10.02.27;	author cal103;	state Exp;
branches
	4.14.1.1;
next	4.13;

4.13
date	2012.03.14.07.39.30;	author cal103;	state Exp;
branches
	4.13.1.1;
next	4.12;

4.12
date	2012.02.29.07.57.56;	author cal103;	state Exp;
branches
	4.12.1.1;
next	4.11;

4.11
date	2012.02.20.23.30.02;	author cal103;	state Exp;
branches
	4.11.1.1;
next	4.10;

4.10
date	2012.02.05.23.41.44;	author cal103;	state Exp;
branches
	4.10.1.1;
next	4.9;

4.9
date	2012.01.24.05.40.29;	author cal103;	state Exp;
branches
	4.9.1.1;
next	4.8;

4.8
date	2011.08.15.08.05.53;	author cal103;	state Exp;
branches
	4.8.1.1;
next	4.7;

4.7
date	2011.02.07.07.03.42;	author cal103;	state Exp;
branches
	4.7.1.1;
next	4.6;

4.6
date	2010.11.16.06.15.31;	author cal103;	state Exp;
branches
	4.6.1.1;
next	4.5;

4.5
date	2010.07.16.07.01.25;	author cal103;	state Exp;
branches
	4.5.1.1;
next	4.4;

4.4
date	2009.08.06.07.41.33;	author cal103;	state Exp;
branches
	4.4.1.1;
next	4.3;

4.3
date	2007.12.27.05.41.36;	author cal103;	state Exp;
branches
	4.3.1.1;
next	4.2;

4.2
date	2005.09.21.13.21.57;	author cal103;	state Exp;
branches
	4.2.1.1;
next	4.1;

4.1
date	2005.08.25.07.48.36;	author cal103;	state Exp;
branches;
next	4.0;

4.0
date	2005.02.04.05.13.14;	author cal103;	state Exp;
branches;
next	3.6;

3.6
date	2004.08.25.04.19.24;	author cal103;	state Exp;
branches;
next	3.5;

3.5
date	2004.06.28.02.13.38;	author mcalabre;	state Exp;
branches;
next	3.4;

3.4
date	2004.02.11.00.15.03;	author mcalabre;	state Exp;
branches;
next	3.3;

3.3
date	2003.10.21.08.51.00;	author mcalabre;	state Exp;
branches;
next	3.2;

3.2
date	2003.09.09.04.04.04;	author mcalabre;	state Exp;
branches;
next	3.1;

3.1
date	2003.04.28.03.50.41;	author mcalabre;	state Exp;
branches;
next	3.0;

3.0
date	2003.04.01.04.10.53;	author mcalabre;	state Exp;
branches;
next	2.13;

2.13
date	2002.04.03.01.25.29;	author mcalabre;	state Exp;
branches;
next	2.12;

2.12
date	2001.11.15.02.37.31;	author mcalabre;	state Exp;
branches;
next	2.11;

2.11
date	2000.12.05.02.11.52;	author mcalabre;	state Exp;
branches;
next	2.10;

2.10
date	2000.05.10.04.44.05;	author mcalabre;	state Exp;
branches;
next	2.9;

2.9
date	99.12.13.07.27.21;	author mcalabre;	state Exp;
branches;
next	2.8;

2.8
date	99.11.19.00.21.36;	author mcalabre;	state Exp;
branches;
next	2.7;

2.7
date	99.05.26.01.32.18;	author mcalabre;	state Exp;
branches;
next	2.6;

2.6
date	99.05.26.01.24.48;	author mcalabre;	state Exp;
branches;
next	2.5;

2.5
date	98.01.30.00.28.46;	author mcalabre;	state Exp;
branches;
next	2.4;

2.4
date	97.01.02.22.08.01;	author mcalabre;	state Exp;
branches;
next	2.3;

2.3
date	96.12.23.22.54.28;	author mcalabre;	state Exp;
branches;
next	2.2;

2.2
date	96.05.24.07.25.36;	author mcalabre;	state Exp;
branches;
next	2.1;

2.1
date	96.05.07.20.12.24;	author mcalabre;	state Exp;
branches;
next	2.0;

2.0
date	95.09.11.03.38.39;	author mcalabre;	state Exp;
branches;
next	1.1;

1.1
date	95.01.25.03.55.27;	author mcalabre;	state Exp;
branches;
next	;

4.2.1.1
date	2005.12.05.02.39.43;	author cal103;	state Exp;
branches;
next	4.2.1.2;

4.2.1.2
date	2006.08.02.00.14.58;	author cal103;	state Exp;
branches;
next	4.2.1.3;

4.2.1.3
date	2007.07.12.08.02.46;	author cal103;	state Exp;
branches;
next	4.2.1.4;

4.2.1.4
date	2007.08.08.07.20.03;	author cal103;	state Exp;
branches;
next	4.2.1.5;

4.2.1.5
date	2007.08.08.08.40.48;	author cal103;	state Exp;
branches;
next	4.2.1.6;

4.2.1.6
date	2007.12.03.05.02.17;	author cal103;	state Exp;
branches;
next	;

4.3.1.1
date	2007.12.27.13.23.47;	author cal103;	state Exp;
branches;
next	4.3.1.2;

4.3.1.2
date	2008.04.02.06.17.13;	author cal103;	state Exp;
branches;
next	4.3.1.3;

4.3.1.3
date	2009.07.22.05.10.07;	author cal103;	state Exp;
branches;
next	;

4.4.1.1
date	2009.08.10.08.52.49;	author cal103;	state Exp;
branches;
next	4.4.1.2;

4.4.1.2
date	2010.01.19.03.42.50;	author cal103;	state Exp;
branches;
next	;

4.5.1.1
date	2010.07.16.07.05.31;	author cal103;	state Exp;
branches;
next	4.5.1.2;

4.5.1.2
date	2010.11.16.00.13.14;	author cal103;	state Exp;
branches;
next	;

4.6.1.1
date	2010.11.16.06.16.19;	author cal103;	state Exp;
branches;
next	4.6.1.2;

4.6.1.2
date	2011.01.14.06.33.16;	author cal103;	state Exp;
branches;
next	4.6.1.3;

4.6.1.3
date	2011.01.24.23.52.28;	author cal103;	state Exp;
branches;
next	;

4.7.1.1
date	2011.02.07.07.04.22;	author cal103;	state Exp;
branches;
next	4.7.1.2;

4.7.1.2
date	2011.07.21.03.43.08;	author cal103;	state Exp;
branches;
next	4.7.1.3;

4.7.1.3
date	2011.08.09.02.43.50;	author cal103;	state Exp;
branches;
next	4.7.1.4;

4.7.1.4
date	2011.08.10.06.52.12;	author cal103;	state Exp;
branches;
next	4.7.1.5;

4.7.1.5
date	2011.08.15.05.54.25;	author cal103;	state Exp;
branches;
next	;

4.8.1.1
date	2011.08.15.08.07.06;	author cal103;	state Exp;
branches;
next	4.8.1.2;

4.8.1.2
date	2012.01.24.05.23.06;	author cal103;	state Exp;
branches;
next	;

4.9.1.1
date	2012.01.24.05.41.45;	author cal103;	state Exp;
branches;
next	;

4.10.1.1
date	2012.02.05.23.42.46;	author cal103;	state Exp;
branches;
next	;

4.11.1.1
date	2012.02.20.23.31.13;	author cal103;	state Exp;
branches;
next	;

4.12.1.1
date	2012.02.29.07.59.10;	author cal103;	state Exp;
branches;
next	;

4.13.1.1
date	2012.03.14.07.40.37;	author cal103;	state Exp;
branches;
next	4.13.1.2;

4.13.1.2
date	2012.07.13.03.34.20;	author cal103;	state Exp;
branches;
next	;

4.14.1.1
date	2012.07.13.10.04.44;	author cal103;	state Exp;
branches;
next	;

4.15.1.1
date	2012.09.26.14.27.51;	author cal103;	state Exp;
branches;
next	;

4.16.1.1
date	2012.11.07.04.45.56;	author cal103;	state Exp;
branches;
next	4.16.1.2;

4.16.1.2
date	2013.01.29.05.09.44;	author cal103;	state Exp;
branches;
next	;

4.17.1.1
date	2013.01.29.05.32.32;	author cal103;	state Exp;
branches;
next	4.17.1.2;

4.17.1.2
date	2013.07.12.04.04.58;	author mcalabre;	state Exp;
branches;
next	;

4.18.1.1
date	2013.07.13.10.02.37;	author mcalabre;	state Exp;
branches;
next	;

4.19.1.1
date	2013.09.29.14.20.38;	author mcalabre;	state Exp;
branches;
next	4.19.1.2;

4.19.1.2
date	2013.10.06.03.59.39;	author mcalabre;	state Exp;
branches;
next	4.19.1.3;

4.19.1.3
date	2013.12.10.23.05.27;	author mcalabre;	state Exp;
branches;
next	;

4.20.1.1
date	2013.12.18.05.46.55;	author mcalabre;	state Exp;
branches;
next	4.20.1.2;

4.20.1.2
date	2014.03.21.06.32.19;	author mcalabre;	state Exp;
branches;
next	4.20.1.3;

4.20.1.3
date	2014.03.22.05.10.57;	author mcalabre;	state Exp;
branches;
next	;

4.21.1.1
date	2014.03.24.05.15.28;	author mcalabre;	state Exp;
branches;
next	;

4.22.1.1
date	2014.04.12.15.06.32;	author mcalabre;	state Exp;
branches;
next	;

4.23.1.1
date	2014.05.13.05.53.49;	author mcalabre;	state Exp;
branches;
next	;

4.24.1.1
date	2014.09.18.15.28.09;	author mcalabre;	state Exp;
branches;
next	;

4.25.1.1
date	2014.12.14.14.32.45;	author mcalabre;	state Exp;
branches;
next	4.25.1.2;

4.25.1.2
date	2015.01.06.01.01.06;	author mcalabre;	state Exp;
branches;
next	4.25.1.3;

4.25.1.3
date	2015.04.03.01.14.14;	author mcalabre;	state Exp;
branches;
next	4.25.1.4;

4.25.1.4
date	2015.04.05.05.58.16;	author mcalabre;	state Exp;
branches;
next	;

5.0.1.1
date	2015.04.05.12.28.00;	author mcalabre;	state Exp;
branches;
next	;

5.1.1.1
date	2015.04.07.11.01.10;	author mcalabre;	state Exp;
branches;
next	;

5.2.1.1
date	2015.04.15.12.39.14;	author mcalabre;	state Exp;
branches;
next	;

5.3.1.1
date	2015.04.21.02.54.02;	author mcalabre;	state Exp;
branches;
next	;

5.4.1.1
date	2015.04.21.14.44.28;	author mcalabre;	state Exp;
branches;
next	5.4.1.2;

5.4.1.2
date	2015.04.23.11.03.11;	author mcalabre;	state Exp;
branches;
next	;

5.5.1.1
date	2015.05.05.13.21.00;	author mcalabre;	state Exp;
branches;
next	;

5.6.1.1
date	2015.06.14.07.14.44;	author mcalabre;	state Exp;
branches;
next	5.6.1.2;

5.6.1.2
date	2015.06.18.08.11.52;	author mcalabre;	state Exp;
branches;
next	;

5.7.1.1
date	2015.06.29.02.47.24;	author mcalabre;	state Exp;
branches;
next	;

5.8.1.1
date	2015.07.08.11.07.18;	author mcalabre;	state Exp;
branches;
next	;

5.9.1.1
date	2015.07.21.09.28.07;	author mcalabre;	state Exp;
branches;
next	;

5.10.1.1
date	2015.10.09.08.22.35;	author mcalabre;	state Exp;
branches;
next	;

5.11.1.1
date	2015.10.18.09.16.27;	author mcalabre;	state Exp;
branches;
next	;

5.12.1.1
date	2015.11.15.02.16.14;	author mcalabre;	state Exp;
branches;
next	5.12.1.2;

5.12.1.2
date	2016.01.25.05.17.04;	author mcalabre;	state Exp;
branches;
next	;

5.13.1.1
date	2016.01.26.08.54.32;	author mcalabre;	state Exp;
branches;
next	;

5.14.1.1
date	2016.02.07.10.52.44;	author mcalabre;	state Exp;
branches;
next	;

5.15.1.1
date	2016.04.05.12.58.35;	author mcalabre;	state Exp;
branches;
next	5.15.1.2;

5.15.1.2
date	2017.01.15.04.14.00;	author mcalabre;	state Exp;
branches;
next	;

5.16.1.1
date	2017.01.15.04.28.59;	author mcalabre;	state Exp;
branches;
next	;

5.17.1.1
date	2017.09.18.08.45.59;	author mcalabre;	state Exp;
branches;
next	5.17.1.2;

5.17.1.2
date	2018.01.10.08.25.34;	author mcalabre;	state Exp;
branches;
next	;

5.18.1.1
date	2018.01.10.08.33.04;	author mcalabre;	state Exp;
branches;
next	;

5.19.1.1
date	2018.07.26.15.41.40;	author mcalabre;	state Exp;
branches;
next	;

5.20.1.1
date	2018.10.05.05.33.33;	author mcalabre;	state Exp;
branches;
next	;

6.1.1.1
date	2018.10.19.08.36.15;	author mcalabre;	state Exp;
branches;
next	6.1.1.2;

6.1.1.2
date	2018.10.20.09.30.50;	author mcalabre;	state Exp;
branches;
next	;

6.2.1.1
date	2018.10.20.10.04.15;	author mcalabre;	state Exp;
branches;
next	6.2.1.2;

6.2.1.2
date	2019.05.10.01.56.50;	author mcalabre;	state Exp;
branches;
next	6.2.1.3;

6.2.1.3
date	2019.07.11.02.19.06;	author mcalabre;	state Exp;
branches;
next	;

6.3.1.1
date	2019.07.12.07.34.37;	author mcalabre;	state Exp;
branches;
next	;

6.4.1.1
date	2019.08.15.09.31.29;	author mcalabre;	state Exp;
branches;
next	6.4.1.2;

6.4.1.2
date	2019.12.31.03.28.03;	author mcalabre;	state Exp;
branches;
next	;

7.1.1.1
date	2019.12.31.13.28.19;	author mcalabre;	state Exp;
branches;
next	;

7.2.1.1
date	2020.03.09.07.34.50;	author mcalabre;	state Exp;
branches;
next	;

7.3.1.1
date	2020.06.03.03.38.10;	author mcalabre;	state Exp;
branches;
next	7.3.1.2;

7.3.1.2
date	2020.08.17.11.19.09;	author mcalabre;	state Exp;
branches;
next	7.3.1.3;

7.3.1.3
date	2021.01.19.14.09.10;	author mcalabre;	state Exp;
branches;
next	7.3.1.4;

7.3.1.4
date	2021.01.28.12.29.30;	author mcalabre;	state Exp;
branches;
next	;

7.4.1.1
date	2021.01.31.02.26.24;	author mcalabre;	state Exp;
branches;
next	;

7.5.1.1
date	2021.03.20.05.56.42;	author mcalabre;	state Exp;
branches;
next	7.5.1.2;

7.5.1.2
date	2021.04.13.09.21.05;	author mcalabre;	state Exp;
branches;
next	;

7.6.1.1
date	2021.04.13.13.00.35;	author mcalabre;	state Exp;
branches;
next	;

7.7.1.1
date	2021.07.12.06.38.27;	author mcalabre;	state Exp;
branches;
next	7.7.1.2;

7.7.1.2
date	2022.03.25.06.05.59;	author mcalabre;	state Exp;
branches;
next	;

7.8.1.1
date	2022.03.25.06.14.14;	author mcalabre;	state Exp;
branches;
next	;

7.9.1.1
date	2022.03.25.15.16.40;	author mcalabre;	state Exp;
branches;
next	;

7.10.1.1
date	2022.04.23.14.26.54;	author mcalabre;	state Exp;
branches;
next	;

7.11.1.1
date	2022.04.26.06.15.32;	author mcalabre;	state Exp;
branches;
next	;

7.12.1.1
date	2022.09.09.05.00.36;	author mcalabre;	state Exp;
branches;
next	;

7.13.1.1
date	2022.10.07.03.45.47;	author mcalabre;	state Exp;
branches;
next	7.13.1.2;

7.13.1.2
date	2023.06.15.04.17.19;	author mcalabre;	state Exp;
branches;
next	;

8.0.1.1
date	2023.07.01.06.22.44;	author mcalabre;	state Exp;
branches;
next	;

8.1.1.1
date	2023.07.05.17.15.00;	author mcalabre;	state Exp;
branches;
next	;

8.2.1.1
date	2023.11.16.10.05.57;	author mcalabre;	state Exp;
branches;
next	8.2.1.2;

8.2.1.2
date	2024.04.02.14.01.58;	author mcalabre;	state Exp;
branches;
next	8.2.1.3;

8.2.1.3
date	2024.05.08.15.25.29;	author mcalabre;	state Exp;
branches;
next	8.2.1.4;

8.2.1.4
date	2024.05.13.10.27.26;	author mcalabre;	state Exp;
branches;
next	;

8.3.1.1
date	2024.05.13.16.35.39;	author mcalabre;	state Exp;
branches;
next	8.3.1.2;

8.3.1.2
date	2024.07.09.06.50.14;	author mcalabre;	state Exp;
branches;
next	;

8.4.1.1
date	2024.10.28.13.58.41;	author mcalabre;	state Exp;
branches;
next	8.4.1.2;

8.4.1.2
date	2025.11.26.13.54.57;	author mcalabre;	state Exp;
branches;
next	8.4.1.3;

8.4.1.3
date	2025.12.06.13.37.16;	author mcalabre;	state Exp;
branches;
next	;

8.5.1.1
date	2025.12.06.14.05.15;	author mcalabre;	state Exp;
branches;
next	8.5.1.2;

8.5.1.2
date	2026.03.29.13.36.16;	author mcalabre;	state Exp;
branches;
next	;

8.6.1.1
date	2026.03.29.14.19.26;	author mcalabre;	state Exp;
branches;
next	;


desc
@Header file and usage notes for the routines that implement the WCS spherical
projection equations; contains the definition of the "prjprm" struct.
@


8.7
log
@WCSLIB 8.7
@
text
@/*============================================================================
  WCSLIB 8.7 - an implementation of the FITS WCS standard.
  Copyright (C) 1995-2026, Mark Calabretta

  This file is part of WCSLIB.

  WCSLIB is free software: you can redistribute it and/or modify it under the
  terms of the GNU Lesser General Public License as published by the Free
  Software Foundation, either version 3 of the License, or (at your option)
  any later version.

  WCSLIB is distributed in the hope that it will be useful, but WITHOUT ANY
  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for
  more details.

  You should have received a copy of the GNU Lesser General Public License
  along with WCSLIB.  If not, see http://www.gnu.org/licenses.

  Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
  http://www.atnf.csiro.au/computing/software/wcs
  $Id: prj.h,v 8.6.1.1 2026/03/29 14:19:26 mcalabre Exp mcalabre $
*=============================================================================
*
* WCSLIB 8.7 - C routines that implement the FITS World Coordinate System
* (WCS) standard.  Refer to the README file provided with WCSLIB for an
* overview of the library.
*
*
* Summary of the prj routines
* ---------------------------
* Routines in this suite  implement the spherical map projections defined by
* the FITS World Coordinate System (WCS) standard, as described in
*
=   "Representations of world coordinates in FITS",
=   Greisen, E.W., & Calabretta, M.R. 2002, A&A, 395, 1061 (WCS Paper I)
=
=   "Representations of celestial coordinates in FITS",
=   Calabretta, M.R., & Greisen, E.W. 2002, A&A, 395, 1077 (WCS Paper II)
=
=   "Mapping on the HEALPix grid",
=   Calabretta, M.R., & Roukema, B.F. 2007, MNRAS, 381, 865 (WCS Paper V)
=
=   "Representing the 'Butterfly' Projection in FITS -- Projection Code XPH",
=   Calabretta, M.R., & Lowe, S.R. 2013, PASA, 30, e050 (WCS Paper VI)
*
* These routines are based on the prjprm struct which contains all information
* needed for the computations.  The struct contains some members that must be
* set by the user, and others that are maintained by these routines, somewhat
* like a C++ class but with no encapsulation.
*
* Routine prjini() is provided to initialize the prjprm struct with default
* values, prjfree() reclaims any memory that may have been allocated to store
* an error message, prjsize() computes its total size including allocated
* memory, prjenq() returns information about the state of the struct, and
* prjprt() prints its contents.
*
* prjperr() prints the error message(s) (if any) stored in a prjprm struct.
* prjbchk() performs bounds checking on native spherical coordinates.
*
* Setup routines for each projection with names of the form ???set(), where
* "???" is the down-cased three-letter projection code, compute intermediate
* values in the prjprm struct from parameters in it that were supplied by the
* user.  The struct always needs to be set by the projection's setup routine
* but that need not be called explicitly - refer to the explanation of
* prjprm::flag.
*
* Each map projection is implemented via separate functions for the spherical
* projection, ???s2x(), and deprojection, ???x2s().
*
* A set of driver routines, prjset(), prjx2s(), and prjs2x(), provides a
* generic interface to the specific projection routines which they invoke
* via pointers-to-functions stored in the prjprm struct.
*
* In summary, the routines are:
*   - prjini()                Initialization routine for the prjprm struct.
*   - prjfree()               Reclaim memory allocated for error messages.
*   - prjsize()               Compute total size of a prjprm struct.
*   - prjprt()                Print a prjprm struct.
*   - prjperr()               Print error message (if any).
*   - prjbchk()               Bounds checking on native coordinates.
*
*   - prjset(), prjx2s(), prjs2x():   Generic driver routines
*
*   - azpset(), azpx2s(), azps2x():   AZP (zenithal/azimuthal perspective)
*   - szpset(), szpx2s(), szps2x():   SZP (slant zenithal perspective)
*   - tanset(), tanx2s(), tans2x():   TAN (gnomonic)
*   - stgset(), stgx2s(), stgs2x():   STG (stereographic)
*   - sinset(), sinx2s(), sins2x():   SIN (orthographic/synthesis)
*   - arcset(), arcx2s(), arcs2x():   ARC (zenithal/azimuthal equidistant)
*   - zpnset(), zpnx2s(), zpns2x():   ZPN (zenithal/azimuthal polynomial)
*   - zeaset(), zeax2s(), zeas2x():   ZEA (zenithal/azimuthal equal area)
*   - airset(), airx2s(), airs2x():   AIR (Airy)
*   - cypset(), cypx2s(), cyps2x():   CYP (cylindrical perspective)
*   - ceaset(), ceax2s(), ceas2x():   CEA (cylindrical equal area)
*   - carset(), carx2s(), cars2x():   CAR (Plate carree)
*   - merset(), merx2s(), mers2x():   MER (Mercator)
*   - sflset(), sflx2s(), sfls2x():   SFL (Sanson-Flamsteed)
*   - parset(), parx2s(), pars2x():   PAR (parabolic)
*   - molset(), molx2s(), mols2x():   MOL (Mollweide)
*   - aitset(), aitx2s(), aits2x():   AIT (Hammer-Aitoff)
*   - copset(), copx2s(), cops2x():   COP (conic perspective)
*   - coeset(), coex2s(), coes2x():   COE (conic equal area)
*   - codset(), codx2s(), cods2x():   COD (conic equidistant)
*   - cooset(), coox2s(), coos2x():   COO (conic orthomorphic)
*   - bonset(), bonx2s(), bons2x():   BON (Bonne)
*   - pcoset(), pcox2s(), pcos2x():   PCO (polyconic)
*   - tscset(), tscx2s(), tscs2x():   TSC (tangential spherical cube)
*   - cscset(), cscx2s(), cscs2x():   CSC (COBE spherical cube)
*   - qscset(), qscx2s(), qscs2x():   QSC (quadrilateralized spherical cube)
*   - hpxset(), hpxx2s(), hpxs2x():   HPX (HEALPix)
*   - xphset(), xphx2s(), xphs2x():   XPH (HEALPix polar, aka "butterfly")
*
* Argument checking (projection routines):
* ----------------------------------------
* The values of phi and theta (the native longitude and latitude) normally lie
* in the range [-180,180] for phi, and [-90,90] for theta.  However, all
* projection routines will accept any value of phi and will not normalize it.
*
* The projection routines do not explicitly check that theta lies within the
* range [-90,90].  They do check for any value of theta that produces an
* invalid argument to the projection equations (e.g. leading to division by
* zero).  The projection routines for AZP, SZP, TAN, SIN, ZPN, and COP also
* return error 2 if (phi,theta) corresponds to the overlapped (far) side of
* the projection but also return the corresponding value of (x,y).  This
* strict bounds checking may be relaxed at any time by setting
* prjprm::bounds%2 to 0 (rather than 1); the projections need not be
* reinitialized.
*
* Argument checking (deprojection routines):
* ------------------------------------------
* Error checking on the projected coordinates (x,y) is limited to that
* required to ascertain whether a solution exists.  Where a solution does
* exist, an optional check is made that the value of phi and theta obtained
* lie within the ranges [-180,180] for phi, and [-90,90] for theta.  This
* check, performed by prjbchk(), is enabled by default.  It may be disabled by
* setting prjprm::bounds%4 to 0 (rather than 1); the projections need not be
* reinitialized.
*
* Accuracy:
* ---------
* No warranty is given for the accuracy of these routines (refer to the
* copyright notice); intending users must satisfy for themselves their
* adequacy for the intended purpose.  However, closure to a precision of at
* least 1E-10 degree of longitude and latitude has been verified for typical
* projection parameters on the 1 degree graticule of native longitude and
* latitude (to within 5 degrees of any latitude where the projection may
* diverge).  Refer to the tprj1.c and tprj2.c test routines that accompany
* this software.
*
*
* prjini() - Default constructor for the prjprm struct
* ----------------------------------------------------
* prjini() sets all members of a prjprm struct to default values.  It should
* be used to initialize every prjprm struct.
*
* PLEASE NOTE: If the prjprm struct has already been initialized, then before
* reinitializing, it prjfree() should be used to free any memory that may have
* been allocated to store an error message.  A memory leak may otherwise
* result.
*
* Returned:
*   prj       struct prjprm*
*                       Projection parameters.
*
* Function return value:
*             int       Status return value:
*                         0: Success.
*                         1: Null prjprm pointer passed.
*
*
* prjfree() - Destructor for the prjprm struct
* --------------------------------------------
* prjfree() frees any memory that may have been allocated to store an error
* message in the prjprm struct.
*
* Given and returned:
*   prj       struct prjprm*
*                       Projection parameters.
*
* Function return value:
*             int       Status return value:
*                         0: Success.
*                         1: Null prjprm pointer passed.
*
*
* prjsize() - Compute the size of a prjprm struct
* -----------------------------------------------
* prjsize() computes the full size of a prjprm struct, including allocated
* memory.
*
* Given:
*   prj       const struct prjprm*
*                       Projection parameters.
*
*                       If NULL, the base size of the struct and the allocated
*                       size are both set to zero.
*
* Returned:
*   sizes     int[2]    The first element is the base size of the struct as
*                       returned by sizeof(struct prjprm).  The second element
*                       is the total allocated size, in bytes.  This figure
*                       includes memory allocated for the constituent struct,
*                       prjprm::err.
*
*                       It is not an error for the struct not to have been set
*                       up via prjset().
*
* Function return value:
*             int       Status return value:
*                         0: Success.
*
*
* prjenq() - enquire about the state of a prjprm struct
* -----------------------------------------------------
* prjenq() may be used to obtain information about the state of a prjprm
* struct.  The function returns a true/false answer for the enquiry asked.
*
* Given:
*   prj       const struct prjprm*
*                       Projection parameters.
*
*   enquiry   int       Enquiry according to the following parameters:
*                         PRJENQ_SET: the struct has been set up by prjset().
*                         PRJENQ_BYP: the struct is in bypass mode (see
*                                     prjset()).
*
* Function return value:
*             int       Enquiry result:
*                         0: No.
*                         1: Yes.
*
*
* prjprt() - Print routine for the prjprm struct
* ----------------------------------------------
* prjprt() prints the contents of a prjprm struct using wcsprintf().  Mainly
* intended for diagnostic purposes.
*
* Given:
*   prj       const struct prjprm*
*                       Projection parameters.
*
* Function return value:
*             int       Status return value:
*                         0: Success.
*                         1: Null prjprm pointer passed.
*
*
* prjperr() - Print error messages from a prjprm struct
* -----------------------------------------------------
* prjperr() prints the error message(s) (if any) stored in a prjprm struct.
* If there are no errors then nothing is printed.  It uses wcserr_prt(), q.v.
*
* Given:
*   prj       const struct prjprm*
*                       Projection parameters.
*
*   prefix    const char *
*                       If non-NULL, each output line will be prefixed with
*                       this string.
*
* Function return value:
*             int       Status return value:
*                         0: Success.
*                         1: Null prjprm pointer passed.
*
*
* prjbchk() - Bounds checking on native coordinates
* -------------------------------------------------
* prjbchk() performs bounds checking on native spherical coordinates.  As
* returned by the deprojection (x2s) routines, native longitude is expected
* to lie in the closed interval [-180,180], with latitude in [-90,90].
*
* A tolerance may be specified to provide a small allowance for numerical
* imprecision.  Values that lie outside the allowed range by not more than
* the specified tolerance will be adjusted back into range.
*
* If prjprm::bounds&4 is set, as it is by prjini(), then prjbchk() will be
* invoked automatically by the Cartesian-to-spherical deprojection (x2s)
* routines with an appropriate tolerance set for each projection.
*
* Given:
*   tol       double    Tolerance for the bounds check [deg].
*
*   nphi,
*   ntheta    int       Vector lengths.
*
*   spt       int       Vector stride.
*
* Given and returned:
*   phi,theta double[]  Native longitude and latitude (phi,theta) [deg].
*
* Returned:
*   stat      int[]     Status value for each vector element:
*                         0: Valid value of (phi,theta).
*                         1: Invalid value.
*
* Function return value:
*             int       Status return value:
*                         0: Success.
*                         1: One or more of the (phi,theta) coordinates
*                            were, invalid, as indicated by the stat vector.
*
*
* prjset() - Generic setup routine for the prjprm struct
* ------------------------------------------------------
* prjset() sets up a prjprm struct according to information supplied within
* it.
*
* The one important distinction between prjset() and the setup routines for
* the specific projections is that the projection code must be defined in the
* prjprm struct in order for prjset() to identify the required projection.
* Once prjset() has initialized the prjprm struct, prjx2s() and prjs2x() use
* the pointers to the specific projection and deprojection routines contained
* therein.
*
* Note that this routine need not be called directly; it will be invoked by
* prjx2s() and prjs2x() if prj.flag is anything other than a predefined magic
* value.
*
* prjset() normally operates regardless of the value of prjprm::flag; i.e.
* even if a struct was previously set up it will be reset unconditionally.
* However, a prjprm struct may be put into "bypass" mode by invoking prjset()
* initially with prjprm::flag == 1 (rather than 0).  prjset() will return
* immediately if invoked on a struct in that state.  To take a struct out of
* bypass mode, simply reset prjprm::flag to zero.  See also prjenq().
*
* Given and returned:
*   prj       struct prjprm*
*                       Projection parameters.
*
* Function return value:
*             int       Status return value:
*                         0: Success.
*                         1: Null prjprm pointer passed.
*                         2: Invalid projection parameters.
*
*                       For returns > 1, a detailed error message is set in
*                       prjprm::err if enabled, see wcserr_enable().
*
*
* prjx2s() - Generic Cartesian-to-spherical deprojection
* ------------------------------------------------------
* Deproject Cartesian (x,y) coordinates in the plane of projection to native
* spherical coordinates (phi,theta).
*
* The projection is that specified by prjprm::code.
*
* Given and returned:
*   prj       struct prjprm*
*                       Projection parameters.
*
* Given:
*   nx,ny     int       Vector lengths.
*
*   sxy,spt   int       Vector strides.
*
*   x,y       const double[]
*                       Projected coordinates.
*
* Returned:
*   phi,theta double[]  Longitude and latitude (phi,theta) of the projected
*                       point in native spherical coordinates [deg].
*
*   stat      int[]     Status value for each vector element:
*                         0: Success.
*                         1: Invalid value of (x,y).
*
* Function return value:
*             int       Status return value:
*                         0: Success.
*                         1: Null prjprm pointer passed.
*                         2: Invalid projection parameters.
*                         3: One or more of the (x,y) coordinates were
*                            invalid, as indicated by the stat vector.
*
*                       For returns > 1, a detailed error message is set in
*                       prjprm::err if enabled, see wcserr_enable().
*
*
* prjs2x() - Generic spherical-to-Cartesian projection
* ----------------------------------------------------
* Project native spherical coordinates (phi,theta) to Cartesian (x,y)
* coordinates in the plane of projection.
*
* The projection is that specified by prjprm::code.
*
* Given and returned:
*   prj       struct prjprm*
*                       Projection parameters.
*
* Given:
*   nphi,
*   ntheta    int       Vector lengths.
*
*   spt,sxy   int       Vector strides.
*
*   phi,theta const double[]
*                       Longitude and latitude (phi,theta) of the projected
*                       point in native spherical coordinates [deg].
*
* Returned:
*   x,y       double[]  Projected coordinates.
*
*   stat      int[]     Status value for each vector element:
*                         0: Success.
*                         1: Invalid value of (phi,theta).
*
* Function return value:
*             int       Status return value:
*                         0: Success.
*                         1: Null prjprm pointer passed.
*                         2: Invalid projection parameters.
*                         4: One or more of the (phi,theta) coordinates
*                            were, invalid, as indicated by the stat vector.
*
*                       For returns > 1, a detailed error message is set in
*                       prjprm::err if enabled, see wcserr_enable().
*
*
* ???set() - Specific setup routines for the prjprm struct
* --------------------------------------------------------
* Set up a prjprm struct for a particular projection according to information
* supplied within it.
*
* Given and returned:
*   prj       struct prjprm*
*                       Projection parameters.
*
* Function return value:
*             int       Status return value:
*                         0: Success.
*                         1: Null prjprm pointer passed.
*                         2: Invalid projection parameters.
*
*                       For returns > 1, a detailed error message is set in
*                       prjprm::err if enabled, see wcserr_enable().
*
*
* ???x2s() - Specific Cartesian-to-spherical deprojection routines
* ----------------------------------------------------------------
* Transform (x,y) coordinates in the plane of projection to native spherical
* coordinates (phi,theta).
*
* Given and returned:
*   prj       struct prjprm*
*                       Projection parameters.
*
* Given:
*   nx,ny     int       Vector lengths.
*
*   sxy,spt   int       Vector strides.
*
*   x,y       const double[]
*                       Projected coordinates.
*
* Returned:
*   phi,theta double[]  Longitude and latitude of the projected point in
*                       native spherical coordinates [deg].
*
*   stat      int[]     Status value for each vector element:
*                         0: Success.
*                         1: Invalid value of (x,y).
*
* Function return value:
*             int       Status return value:
*                         0: Success.
*                         1: Null prjprm pointer passed.
*                         2: Invalid projection parameters.
*                         3: One or more of the (x,y) coordinates were
*                            invalid, as indicated by the stat vector.
*
*                       For returns > 1, a detailed error message is set in
*                       prjprm::err if enabled, see wcserr_enable().
*
*
* ???s2x() - Specific spherical-to-Cartesian projection routines
*---------------------------------------------------------------
* Transform native spherical coordinates (phi,theta) to (x,y) coordinates in
* the plane of projection.
*
* Given and returned:
*   prj       struct prjprm*
*                       Projection parameters.
*
* Given:
*   nphi,
*   ntheta    int       Vector lengths.
*
*   spt,sxy   int       Vector strides.
*
*   phi,theta const double[]
*                       Longitude and latitude of the projected point in
*                       native spherical coordinates [deg].
*
* Returned:
*   x,y       double[]  Projected coordinates.
*
*   stat      int[]     Status value for each vector element:
*                         0: Success.
*                         1: Invalid value of (phi,theta).
*
* Function return value:
*             int       Status return value:
*                         0: Success.
*                         1: Null prjprm pointer passed.
*                         2: Invalid projection parameters.
*                         4: One or more of the (phi,theta) coordinates
*                            were, invalid, as indicated by the stat vector.
*
*                       For returns > 1, a detailed error message is set in
*                       prjprm::err if enabled, see wcserr_enable().
*
*
* prjprm struct - Projection parameters
* -------------------------------------
* The prjprm struct contains all information needed to project or deproject
* native spherical coordinates.  It consists of certain members that must be
* set by the user ("given") and others that are set by the WCSLIB routines
* ("returned").  Some of the latter are supplied for informational purposes
* while others are for internal use only.
*
*   int flag
*     (Given and returned) This flag must be set to zero (or 1, see prjset())
*     whenever any of the following prjprm members are set or changed:
*
*       - prjprm::code,
*       - prjprm::r0,
*       - prjprm::pv[],
*       - prjprm::phi0,
*       - prjprm::theta0.
*
*     This signals the initialization routine (prjset() or ???set()) to
*     recompute the returned members of the prjprm struct.  flag will then be
*     reset to indicate that this has been done.
*
*     Note that flag need not be reset when prjprm::bounds is changed.
*
*   char code[4]
*     (Given) Three-letter projection code defined by the FITS standard.
*
*   double r0
*     (Given) The radius of the generating sphere for the projection, a linear
*     scaling parameter.  If this is zero, it will be reset to its default
*     value of 180/pi (the value for FITS WCS).
*
*   double pv[30]
*     (Given) Projection parameters.  These correspond to the PVi_ma keywords
*     in FITS, so pv[0] is PVi_0a, pv[1] is PVi_1a, etc., where i denotes the
*     latitude-like axis.  Many projections use pv[1] (PVi_1a), some also use
*     pv[2] (PVi_2a) and SZP uses pv[3] (PVi_3a).  ZPN is currently the only
*     projection that uses any of the others.
*
*     Usage of the pv[] array as it applies to each projection is described in
*     the prologue to each trio of projection routines in prj.c.
*
*   double phi0
*     (Given) The native longitude, phi_0 [deg], and ...
*   double theta0
*     (Given) ... the native latitude, theta_0 [deg], of the reference point,
*     i.e. the point (x,y) = (0,0).  If undefined (set to a magic value by
*     prjini()) the initialization routine will set this to a
*     projection-specific default.
*
*   int bounds
*     (Given) Controls bounds checking.  If bounds&1 then enable strict bounds
*     checking for the spherical-to-Cartesian (s2x) transformation for the
*     AZP, SZP, TAN, SIN, ZPN, and COP projections.  If bounds&2 then enable
*     strict bounds checking for the Cartesian-to-spherical transformation
*     (x2s) for the HPX and XPH projections.  If bounds&4 then the Cartesian-
*     to-spherical transformations (x2s) will invoke prjbchk() to perform
*     bounds checking on the computed native coordinates, with a tolerance set
*     to suit each projection.  bounds is set to 7 by prjini() by default
*     which enables all checks.  Zero it to disable all checking.
*
*     It is not necessary to reset the prjprm struct (via prjset() or
*     ???set()) when prjprm::bounds is changed.
*
* The remaining members of the prjprm struct are maintained by the setup
* routines and must not be modified elsewhere:
*
*   char name[40]
*     (Returned) Long name of the projection.
*
*     Provided for information only, not used by the projection routines.
*
*   int  category
*     (Returned) Projection category matching the value of the relevant global
*     variable:
*
*     - ZENITHAL,
*     - CYLINDRICAL,
*     - PSEUDOCYLINDRICAL,
*     - CONVENTIONAL,
*     - CONIC,
*     - POLYCONIC,
*     - QUADCUBE, and
*     - HEALPIX.
*
*     The category name may be identified via the prj_categories character
*     array, e.g.
*
=       struct prjprm prj;
=         ...
=       printf("%s\n", prj_categories[prj.category]);
*
*     Provided for information only, not used by the projection routines.
*
*   int  pvrange
*     (Returned) Range of projection parameter indices: 100 times the first
*     allowed index plus the number of parameters, e.g. TAN is 0 (no
*     parameters), SZP is 103 (1 to 3), and ZPN is 30 (0 to 29).
*
*     Provided for information only, not used by the projection routines.
*
*   int  simplezen
*     (Returned) True if the projection is a radially-symmetric zenithal
*     projection.
*
*     Provided for information only, not used by the projection routines.
*
*   int  equiareal
*     (Returned) True if the projection is equal area.
*
*     Provided for information only, not used by the projection routines.
*
*   int  conformal
*     (Returned) True if the projection is conformal.
*
*     Provided for information only, not used by the projection routines.
*
*   int  global
*     (Returned) True if the projection can represent the whole sphere in a
*     finite, non-overlapped mapping.
*
*     Provided for information only, not used by the projection routines.
*
*   int  divergent
*     (Returned) True if the projection diverges in latitude.
*
*     Provided for information only, not used by the projection routines.
*
*   double x0
*     (Returned) The offset in x, and ...
*   double y0
*     (Returned) ... the offset in y used to force (x,y) = (0,0) at
*     (phi_0,theta_0).
*
*   struct wcserr *err
*     (Returned) If enabled, when an error status is returned, this struct
*     contains detailed information about the error, see wcserr_enable().
*
*   void *padding
*     (An unused variable inserted for alignment purposes only.)
*
*   double w[10]
*     (For internal use only.) Intermediate floating-point values derived from
*     the projection parameters by prjset(), cached here to save recomputation.
*
*     Usage of the w[] array as it applies to each projection is described in
*     the prologue to each trio of projection routines in prj.c.
*
*   int m, n
*     (For internal use only.) Intermediate integer values set by prjset()
*     (used only for the ZPN and HPX projections).
*
*   int (*prjx2s)(PRJX2S_ARGS)
*     (For internal use only.) Pointer to the spherical projection ...
*   int (*prjs2x)(PRJ_ARGS)
*     (For internal use only.) ... and deprojection routines.
*
*
* Global variable: const char *prj_errmsg[] - Status return messages
* ------------------------------------------------------------------
* Error messages to match the status value returned from each function.
*
*===========================================================================*/

#ifndef WCSLIB_PROJ
#define WCSLIB_PROJ

#ifdef __cplusplus
extern "C" {
#endif

enum prjenq_enum {
  PRJENQ_SET = 2,		// prjprm struct has been set up.
  PRJENQ_BYP = 4,		// prjprm struct is in bypass mode.
};

// Total number of projection parameters; 0 to PVN-1.
#define PVN 30

extern const char *prj_errmsg[];

enum prj_errmsg_enum {
  PRJERR_SUCCESS      = 0,	// Success.
  PRJERR_NULL_POINTER = 1,	// Null prjprm pointer passed.
  PRJERR_BAD_PARAM    = 2,	// Invalid projection parameters.
  PRJERR_BAD_PIX      = 3,	// One or more of the (x, y) coordinates were
				// invalid.
  PRJERR_BAD_WORLD    = 4	// One or more of the (phi, theta) coordinates
				// were invalid.
};

extern const int CONIC, CONVENTIONAL, CYLINDRICAL, POLYCONIC,
                 PSEUDOCYLINDRICAL, QUADCUBE, ZENITHAL, HEALPIX;
extern const char prj_categories[9][32];

extern const int  prj_ncode;
extern const char prj_codes[28][4];

#ifdef PRJX2S_ARGS
#undef PRJX2S_ARGS
#endif

#ifdef PRJS2X_ARGS
#undef PRJS2X_ARGS
#endif

// For use in declaring deprojection function prototypes.
#define PRJX2S_ARGS struct prjprm *prj, int nx, int ny, int sxy, int spt, \
const double x[], const double y[], double phi[], double theta[], int stat[]

// For use in declaring projection function prototypes.
#define PRJS2X_ARGS struct prjprm *prj, int nx, int ny, int sxy, int spt, \
const double phi[], const double theta[], double x[], double y[], int stat[]


struct prjprm {
  // Initialization flag (see the prologue above).
  //--------------------------------------------------------------------------
  int    flag;			// Set to zero to force initialization.

  // Parameters to be provided (see the prologue above).
  //--------------------------------------------------------------------------
  char   code[4];		// Three-letter projection code.
  double r0;			// Radius of the generating sphere.
  double pv[PVN];		// Projection parameters.
  double phi0, theta0;		// Fiducial native coordinates.
  int    bounds;		// Controls bounds checking.

  // Information derived from the parameters supplied.
  //--------------------------------------------------------------------------
  char   name[40];		// Projection name.
  int    category;		// Projection category.
  int    pvrange;		// Range of projection parameter indices.
  int    simplezen;		// Is it a simple zenithal projection?
  int    equiareal;		// Is it an equal area projection?
  int    conformal;		// Is it a conformal projection?
  int    global;		// Can it map the whole sphere?
  int    divergent;		// Does the projection diverge in latitude?
  double x0, y0;		// Fiducial offsets.

  // Error messaging, if enabled.
  //--------------------------------------------------------------------------
  struct wcserr *err;

  //--------------------------------------------------------------------------
  // Private - the remainder are for internal use.
  //--------------------------------------------------------------------------
  void *padding;		// (Dummy inserted for alignment purposes.)

  double w[10];			// Intermediate values set by prjset().
  int    m, n;			// Intermediate values set by prjset().

  int (*prjx2s)(PRJX2S_ARGS);	// Pointers to the spherical projection and
  int (*prjs2x)(PRJS2X_ARGS);	// deprojection functions.
};

// Size of the prjprm struct in int units, used by the Fortran wrappers.
#define PRJLEN (sizeof(struct prjprm)/sizeof(int))


int prjini(struct prjprm *prj);

int prjfree(struct prjprm *prj);

int prjsize(const struct prjprm *prj, int sizes[2]);

int prjenq(const struct prjprm *prj, int enquiry);

int prjprt(const struct prjprm *prj);

int prjperr(const struct prjprm *prj, const char *prefix);

int prjbchk(double tol, int nphi, int ntheta, int spt, double phi[],
            double theta[], int stat[]);

// Use the preprocessor to help declare function prototypes (see above).
int prjset(struct prjprm *prj);
int prjx2s(PRJX2S_ARGS);
int prjs2x(PRJS2X_ARGS);

int azpset(struct prjprm *prj);
int azpx2s(PRJX2S_ARGS);
int azps2x(PRJS2X_ARGS);

int szpset(struct prjprm *prj);
int szpx2s(PRJX2S_ARGS);
int szps2x(PRJS2X_ARGS);

int tanset(struct prjprm *prj);
int tanx2s(PRJX2S_ARGS);
int tans2x(PRJS2X_ARGS);

int stgset(struct prjprm *prj);
int stgx2s(PRJX2S_ARGS);
int stgs2x(PRJS2X_ARGS);

int sinset(struct prjprm *prj);
int sinx2s(PRJX2S_ARGS);
int sins2x(PRJS2X_ARGS);

int arcset(struct prjprm *prj);
int arcx2s(PRJX2S_ARGS);
int arcs2x(PRJS2X_ARGS);

int zpnset(struct prjprm *prj);
int zpnx2s(PRJX2S_ARGS);
int zpns2x(PRJS2X_ARGS);

int zeaset(struct prjprm *prj);
int zeax2s(PRJX2S_ARGS);
int zeas2x(PRJS2X_ARGS);

int airset(struct prjprm *prj);
int airx2s(PRJX2S_ARGS);
int airs2x(PRJS2X_ARGS);

int cypset(struct prjprm *prj);
int cypx2s(PRJX2S_ARGS);
int cyps2x(PRJS2X_ARGS);

int ceaset(struct prjprm *prj);
int ceax2s(PRJX2S_ARGS);
int ceas2x(PRJS2X_ARGS);

int carset(struct prjprm *prj);
int carx2s(PRJX2S_ARGS);
int cars2x(PRJS2X_ARGS);

int merset(struct prjprm *prj);
int merx2s(PRJX2S_ARGS);
int mers2x(PRJS2X_ARGS);

int sflset(struct prjprm *prj);
int sflx2s(PRJX2S_ARGS);
int sfls2x(PRJS2X_ARGS);

int parset(struct prjprm *prj);
int parx2s(PRJX2S_ARGS);
int pars2x(PRJS2X_ARGS);

int molset(struct prjprm *prj);
int molx2s(PRJX2S_ARGS);
int mols2x(PRJS2X_ARGS);

int aitset(struct prjprm *prj);
int aitx2s(PRJX2S_ARGS);
int aits2x(PRJS2X_ARGS);

int copset(struct prjprm *prj);
int copx2s(PRJX2S_ARGS);
int cops2x(PRJS2X_ARGS);

int coeset(struct prjprm *prj);
int coex2s(PRJX2S_ARGS);
int coes2x(PRJS2X_ARGS);

int codset(struct prjprm *prj);
int codx2s(PRJX2S_ARGS);
int cods2x(PRJS2X_ARGS);

int cooset(struct prjprm *prj);
int coox2s(PRJX2S_ARGS);
int coos2x(PRJS2X_ARGS);

int bonset(struct prjprm *prj);
int bonx2s(PRJX2S_ARGS);
int bons2x(PRJS2X_ARGS);

int pcoset(struct prjprm *prj);
int pcox2s(PRJX2S_ARGS);
int pcos2x(PRJS2X_ARGS);

int tscset(struct prjprm *prj);
int tscx2s(PRJX2S_ARGS);
int tscs2x(PRJS2X_ARGS);

int cscset(struct prjprm *prj);
int cscx2s(PRJX2S_ARGS);
int cscs2x(PRJS2X_ARGS);

int qscset(struct prjprm *prj);
int qscx2s(PRJX2S_ARGS);
int qscs2x(PRJS2X_ARGS);

int hpxset(struct prjprm *prj);
int hpxx2s(PRJX2S_ARGS);
int hpxs2x(PRJS2X_ARGS);

int xphset(struct prjprm *prj);
int xphx2s(PRJX2S_ARGS);
int xphs2x(PRJS2X_ARGS);


// Deprecated.
#define prjini_errmsg prj_errmsg
#define prjprt_errmsg prj_errmsg
#define prjset_errmsg prj_errmsg
#define prjx2s_errmsg prj_errmsg
#define prjs2x_errmsg prj_errmsg

#ifdef __cplusplus
}
#endif

#endif // WCSLIB_PROJ
@


8.6
log
@WCSLIB 8.6
@
text
@d2 1
a2 1
  WCSLIB 8.6 - an implementation of the FITS WCS standard.
d22 1
a22 1
  $Id: prj.h,v 8.5.1.2 2026/03/29 13:36:16 mcalabre Exp mcalabre $
d25 1
a25 1
* WCSLIB 8.6 - C routines that implement the FITS World Coordinate System
@


8.6.1.1
log
@WCSLIB 8.6 development branch.
@
text
@d22 1
a22 1
  $Id: prj.h,v 8.6 2026/03/29 13:53:56 mcalabre Exp $
@


8.5
log
@WCSLIB 8.5
@
text
@d2 2
a3 2
  WCSLIB 8.5 - an implementation of the FITS WCS standard.
  Copyright (C) 1995-2025, Mark Calabretta
d21 2
a22 2
  http://www.atnf.csiro.au/people/Mark.Calabretta
  $Id: prj.h,v 8.4.1.3 2025/12/06 13:37:16 mcalabre Exp mcalabre $
d25 1
a25 1
* WCSLIB 8.5 - C routines that implement the FITS World Coordinate System
@


8.5.1.1
log
@WCSLIB 8.5 development branch.
@
text
@d22 1
a22 1
  $Id: prj.h,v 8.5 2025/12/06 13:47:41 mcalabre Exp $
@


8.5.1.2
log
@Updated date in copyright notice.
@
text
@d3 1
a3 1
  Copyright (C) 1995-2026, Mark Calabretta
d21 2
a22 2
  http://www.atnf.csiro.au/computing/software/wcs
  $Id: prj.h,v 8.5.1.1 2025/12/06 14:05:15 mcalabre Exp mcalabre $
@


8.4
log
@WCSLIB 8.4
@
text
@d2 2
a3 2
  WCSLIB 8.4 - an implementation of the FITS WCS standard.
  Copyright (C) 1995-2024, Mark Calabretta
d22 1
a22 1
  $Id: prj.h,v 8.3.1.2 2024/07/09 06:50:14 mcalabre Exp mcalabre $
d25 1
a25 1
* WCSLIB 8.4 - C routines that implement the FITS World Coordinate System
d177 1
a177 1
* Given:
@


8.4.1.1
log
@WCSLIB 8.4 development branch.
@
text
@d22 1
a22 1
  $Id: prj.h,v 8.4 2024/10/28 13:56:16 mcalabre Exp $
@


8.4.1.2
log
@In prjfree(), prj is given and returned.
@
text
@d22 1
a22 1
  $Id: prj.h,v 8.4.1.1 2024/10/28 13:58:41 mcalabre Exp mcalabre $
d177 1
a177 1
* Given and returned:
@


8.4.1.3
log
@Updated date in copyright notice.
@
text
@d3 1
a3 1
  Copyright (C) 1995-2025, Mark Calabretta
d22 1
a22 1
  $Id: prj.h,v 8.4.1.2 2025/11/26 13:54:57 mcalabre Exp mcalabre $
@


8.3
log
@WCSLIB 8.3
@
text
@d2 1
a2 1
  WCSLIB 8.3 - an implementation of the FITS WCS standard.
d22 1
a22 1
  $Id: prj.h,v 8.2.1.4 2024/05/13 10:27:26 mcalabre Exp mcalabre $
d25 1
a25 1
* WCSLIB 8.3 - C routines that implement the FITS World Coordinate System
d657 2
a658 2
*     (Returned) Intermediate floating-point values derived from the
*     projection parameters, cached here to save recomputation.
d663 3
a665 3
*   int n
*     (Returned) Intermediate integer value (used only for the ZPN and HPX
*     projections).
d668 1
a668 1
*     (Returned) Pointer to the spherical projection ...
d670 1
a670 1
*     (Returned) ... and deprojection routines.
d755 1
a755 1
  // Error handling
a758 1
  // Private
d760 6
a765 3
  void   *padding;		// (Dummy inserted for alignment purposes.)
  double w[10];			// Intermediate values.
  int    m, n;			// Intermediate values.
@


8.3.1.1
log
@WCSLIB 8.3 development branch.
@
text
@d22 1
a22 1
  $Id: prj.h,v 8.3 2024/05/13 16:33:00 mcalabre Exp $
@


8.3.1.2
log
@Tweaked comments in the prologue and within the struct definition.
@
text
@d22 1
a22 1
  $Id: prj.h,v 8.3.1.1 2024/05/13 16:35:39 mcalabre Exp mcalabre $
d657 2
a658 2
*     (For internal use only.) Intermediate floating-point values derived from
*     the projection parameters by prjset(), cached here to save recomputation.
d663 3
a665 3
*   int m, n
*     (For internal use only.) Intermediate integer values set by prjset()
*     (used only for the ZPN and HPX projections).
d668 1
a668 1
*     (For internal use only.) Pointer to the spherical projection ...
d670 1
a670 1
*     (For internal use only.) ... and deprojection routines.
d755 1
a755 1
  // Error messaging, if enabled.
d759 1
d761 3
a763 6
  // Private - the remainder are for internal use.
  //--------------------------------------------------------------------------
  void *padding;		// (Dummy inserted for alignment purposes.)

  double w[10];			// Intermediate values set by prjset().
  int    m, n;			// Intermediate values set by prjset().
@


8.2
log
@WCSLIB 8.2
@
text
@d2 2
a3 2
  WCSLIB 8.2 - an implementation of the FITS WCS standard.
  Copyright (C) 1995-2023, Mark Calabretta
d22 1
a22 1
  $Id: prj.h,v 8.1.1.1 2023/07/05 17:15:00 mcalabre Exp mcalabre $
d25 1
a25 1
* WCSLIB 8.2 - C routines that implement the FITS World Coordinate System
d55 2
a56 1
* memory, and prjprt() prints its contents.
d214 20
a309 4
* Note that this routine need not be called directly; it will be invoked by
* prjx2s() and prjs2x() if prj.flag is anything other than a predefined magic
* value.
*
d317 11
d524 2
a525 2
*     (Given and returned) This flag must be set to zero whenever any of the
*     following prjprm struct members are set or changed:
d686 4
d778 2
@


8.2.1.1
log
@WCSLIB 8.2 development branch.
@
text
@d22 1
a22 1
  $Id: prj.h,v 8.2 2023/11/16 10:00:29 mcalabre Exp $
@


8.2.1.2
log
@Updated date in copyright notice.
@
text
@d3 1
a3 1
  Copyright (C) 1995-2024, Mark Calabretta
d22 1
a22 1
  $Id: prj.h,v 8.2.1.1 2023/11/16 10:05:57 mcalabre Exp mcalabre $
@


8.2.1.3
log
@Documented bypass mode in prjset() and added prjenq().
@
text
@d22 1
a22 1
  $Id: prj.h,v 8.2.1.2 2024/04/02 14:01:58 mcalabre Exp mcalabre $
d55 1
a55 2
* memory, prjenq() returns information about the state of the struct, and
* prjprt() prints its contents.
a212 21
* prjenq() - enquire about the state of a prjprm struct
* -----------------------------------------------------
* prjenq() may be used to obtain information about the state of a prjprm
* struct.  The function returns a true/false answer for the enquiry asked.
*
* Given:
*   prj       const struct prjprm*
*                       Projection parameters.
*
*   enquiry   int       Enquiry according to the following parameters:
*                         PRJENQ_SET: the struct has been set up by prjset().
*                         PRJENQ_BYP: the struct is in bypass mode, which
*                                     implies that it has been set up (see
*                                     prjset()).
*
* Function return value:
*             int       Enquiry result:
*                         0: No.
*                         1: Yes.
*
*
d289 4
a299 11
* Note that this routine need not be called directly; it will be invoked by
* prjx2s() and prjs2x() if prj.flag is anything other than a predefined magic
* value.
*
* prjset() normally operates regardless of the value of prjprm::flag; i.e.
* even if a struct was previously set up it will be reset unconditionally.
* However, a prjprm struct may be put into "bypass" mode by invoking prjset()
* initially with prjprm::flag == 1 (rather than 0).  prjset() will return
* immediately if invoked on a struct in that state.  To take a struct out of
* bypass mode, simply reset prjprm::flag to zero.  See also prjenq().
*
d496 2
a497 2
*     (Given and returned) This flag must be set to zero (or 1, see prjset())
*     whenever any of the following prjprm members are set or changed:
a657 4
enum prjenq_enum {
  PRJENQ_SET = 2,		// prjprm struct has been set up.
  PRJENQ_BYP = 4,		// prjprm struct is in bypass mode.
};
a745 2

int prjenq(const struct prjprm *prj, int enquiry);
@


8.2.1.4
log
@Amended the prologue comment for prjenq().
@
text
@d22 1
a22 1
  $Id: prj.h,v 8.2.1.3 2024/05/08 15:25:29 mcalabre Exp mcalabre $
d225 2
a226 1
*                         PRJENQ_BYP: the struct is in bypass mode (see
@


8.1
log
@WCSLIB 8.1
@
text
@d2 1
a2 1
  WCSLIB 8.1 - an implementation of the FITS WCS standard.
d22 1
a22 1
  $Id: prj.h,v 8.0.1.1 2023/07/01 06:22:44 mcalabre Exp mcalabre $
d25 1
a25 1
* WCSLIB 8.1 - C routines that implement the FITS World Coordinate System
@


8.1.1.1
log
@WCSLIB 8.1 development branch.
@
text
@d22 1
a22 1
  $Id: prj.h,v 8.1 2023/07/05 17:12:07 mcalabre Exp $
@


8.0
log
@WCSLIB 8.0
@
text
@d2 1
a2 1
  WCSLIB 8.0 - an implementation of the FITS WCS standard.
d22 1
a22 1
  $Id: prj.h,v 7.13.1.2 2023/06/15 04:17:19 mcalabre Exp mcalabre $
d25 1
a25 1
* WCSLIB 8.0 - C routines that implement the FITS World Coordinate System
@


8.0.1.1
log
@WCSLIB 8.0 development branch.
@
text
@d22 1
a22 1
  $Id: prj.h,v 8.0 2023/07/01 06:15:04 mcalabre Exp $
@


7.13
log
@WCSLIB 7.13
@
text
@d2 2
a3 2
  WCSLIB 7.13 - an implementation of the FITS WCS standard.
  Copyright (C) 1995-2022, Mark Calabretta
d22 1
a22 1
  $Id: prj.h,v 7.12.1.1 2022/09/09 05:00:36 mcalabre Exp mcalabre $
d25 1
a25 1
* WCSLIB 7.13 - C routines that implement the FITS World Coordinate System
@


7.13.1.1
log
@WCSLIB 7.13 development branch.
@
text
@d22 1
a22 1
  $Id: prj.h,v 7.13 2022/10/07 03:43:35 mcalabre Exp $
@


7.13.1.2
log
@Updated date in copyright notice.
@
text
@d3 1
a3 1
  Copyright (C) 1995-2023, Mark Calabretta
d22 1
a22 1
  $Id: prj.h,v 7.13.1.1 2022/10/07 03:45:47 mcalabre Exp mcalabre $
@


7.12
log
@WCSLIB 7.12
@
text
@d2 1
a2 1
  WCSLIB 7.12 - an implementation of the FITS WCS standard.
d22 1
a22 1
  $Id: prj.h,v 7.11.1.1 2022/04/26 06:15:32 mcalabre Exp mcalabre $
d25 1
a25 1
* WCSLIB 7.12 - C routines that implement the FITS World Coordinate System
@


7.12.1.1
log
@WCSLIB 7.12 development branch.
@
text
@d22 1
a22 1
  $Id: prj.h,v 7.12 2022/09/09 04:57:58 mcalabre Exp $
@


7.11
log
@WCSLIB 7.11
@
text
@d2 1
a2 1
  WCSLIB 7.11 - an implementation of the FITS WCS standard.
d22 1
a22 1
  $Id: prj.h,v 7.10.1.1 2022/04/23 14:26:54 mcalabre Exp mcalabre $
d25 1
a25 1
* WCSLIB 7.11 - C routines that implement the FITS World Coordinate System
@


7.11.1.1
log
@WCSLIB 7.11 development branch.
@
text
@d22 1
a22 1
  $Id: prj.h,v 7.11 2022/04/26 06:13:52 mcalabre Exp $
@


7.10
log
@WCSLIB 7.10
@
text
@d2 1
a2 1
  WCSLIB 7.10 - an implementation of the FITS WCS standard.
d22 1
a22 1
  $Id: prj.h,v 7.9.1.1 2022/03/25 15:16:40 mcalabre Exp mcalabre $
d25 1
a25 1
* WCSLIB 7.10 - C routines that implement the FITS World Coordinate System
@


7.10.1.1
log
@WCSLIB 7.10 development branch.
@
text
@d22 1
a22 1
  $Id: prj.h,v 7.10 2022/04/23 14:25:15 mcalabre Exp $
@


7.9
log
@WCSLIB 7.9
@
text
@d2 1
a2 1
  WCSLIB 7.9 - an implementation of the FITS WCS standard.
d22 1
a22 1
  $Id: prj.h,v 7.8.1.1 2022/03/25 06:14:14 mcalabre Exp mcalabre $
d25 1
a25 1
* WCSLIB 7.9 - C routines that implement the FITS World Coordinate System
@


7.9.1.1
log
@WCSLIB 7.9 development branch.
@
text
@d22 1
a22 1
  $Id: prj.h,v 7.9 2022/03/25 15:14:48 mcalabre Exp $
@


7.8
log
@WCSLIB 7.8
@
text
@d2 1
a2 1
  WCSLIB 7.8 - an implementation of the FITS WCS standard.
d22 1
a22 1
  $Id: prj.h,v 7.7.1.2 2022/03/25 06:05:59 mcalabre Exp mcalabre $
d25 1
a25 1
* WCSLIB 7.8 - C routines that implement the FITS World Coordinate System
@


7.8.1.1
log
@WCSLIB 7.8 development branch.
@
text
@d22 1
a22 1
  $Id: prj.h,v 7.8 2022/03/25 06:11:49 mcalabre Exp $
@


7.7
log
@WCSLIB 7.7
@
text
@d2 2
a3 2
  WCSLIB 7.7 - an implementation of the FITS WCS standard.
  Copyright (C) 1995-2021, Mark Calabretta
d22 1
a22 1
  $Id: prj.h,v 7.6.1.1 2021/04/13 13:00:35 mcalabre Exp mcalabre $
d25 1
a25 1
* WCSLIB 7.7 - C routines that implement the FITS World Coordinate System
@


7.7.1.1
log
@WCSLIB 7.7 development branch.
@
text
@d22 1
a22 1
  $Id: prj.h,v 7.7 2021/07/12 06:36:49 mcalabre Exp $
@


7.7.1.2
log
@Updated date in copyright notice.
@
text
@d3 1
a3 1
  Copyright (C) 1995-2022, Mark Calabretta
d22 1
a22 1
  $Id: prj.h,v 7.7.1.1 2021/07/12 06:38:27 mcalabre Exp mcalabre $
@


7.6
log
@WCSLIB 7.6
@
text
@d2 1
a2 1
  WCSLIB 7.6 - an implementation of the FITS WCS standard.
d22 1
a22 1
  $Id: prj.h,v 7.5.1.2 2021/04/13 09:21:05 mcalabre Exp mcalabre $
d25 1
a25 1
* WCSLIB 7.6 - C routines that implement the FITS World Coordinate System
@


7.6.1.1
log
@WCSLIB 7.6 development branch.
@
text
@d22 1
a22 1
  $Id: prj.h,v 7.6 2021/04/13 12:57:01 mcalabre Exp $
@


7.5
log
@WCSLIB 7.5
@
text
@d2 1
a2 1
  WCSLIB 7.5 - an implementation of the FITS WCS standard.
d22 1
a22 1
  $Id: prj.h,v 7.4.1.1 2021/01/31 02:26:24 mcalabre Exp mcalabre $
d25 1
a25 1
* WCSLIB 7.5 - C routines that implement the FITS World Coordinate System
d54 2
a55 1
* an error message, and prjprt() prints its contents.
d77 2
a78 1
*   - prjprt()                Print the prjprm struct.
d186 27
a740 1
// Use the preprocessor to help declare function prototypes (see above).
d742 1
d744 3
d748 1
d750 1
d754 1
@


7.5.1.1
log
@WCSLIB 7.5 development branch.
@
text
@d22 1
a22 1
  $Id: prj.h,v 7.5 2021/03/20 05:54:58 mcalabre Exp $
@


7.5.1.2
log
@Added new function prjsize().
@
text
@d22 1
a22 1
  $Id: prj.h,v 7.5.1.1 2021/03/20 05:56:42 mcalabre Exp mcalabre $
d54 1
a54 2
* an error message, prjsize() computes its total size including allocated
* memory, and prjprt() prints its contents.
d76 1
a76 2
*   - prjsize()               Compute total size of a prjprm struct.
*   - prjprt()                Print a prjprm struct.
a183 27
* prjsize() - Compute the size of a prjprm struct
* -----------------------------------------------
* prjsize() computes the full size of a prjprm struct, including allocated
* memory.
*
* Given:
*   prj       const struct prjprm*
*                       Projection parameters.
*
*                       If NULL, the base size of the struct and the allocated
*                       size are both set to zero.
*
* Returned:
*   sizes     int[2]    The first element is the base size of the struct as
*                       returned by sizeof(struct prjprm).  The second element
*                       is the total allocated size, in bytes.  This figure
*                       includes memory allocated for the constituent struct,
*                       prjprm::err.
*
*                       It is not an error for the struct not to have been set
*                       up via prjset().
*
* Function return value:
*             int       Status return value:
*                         0: Success.
*
*
d712 1
a713 1

a714 3

int prjsize(const struct prjprm *prj, int sizes[2]);

a715 1

a716 1

a719 1
// Use the preprocessor to help declare function prototypes (see above).
@


7.4
log
@WCSLIB 7.4
@
text
@d2 1
a2 1
  WCSLIB 7.4 - an implementation of the FITS WCS standard.
d22 1
a22 1
  $Id: prj.h,v 7.3.1.4 2021/01/28 12:29:30 mcalabre Exp $
d25 1
a25 1
* WCSLIB 7.4 - C routines that implement the FITS World Coordinate System
@


7.4.1.1
log
@WCSLIB 7.4 development branch.
@
text
@d22 1
a22 1
  $Id: prj.h,v 7.4 2021/01/31 02:24:51 mcalabre Exp $
@


7.3
log
@WCSLIB 7.3
@
text
@d2 2
a3 3

  WCSLIB 7.3 - an implementation of the FITS WCS standard.
  Copyright (C) 1995-2020, Mark Calabretta
a19 2
  Direct correspondence concerning WCSLIB to mark@@calabretta.id.au

d22 1
a22 1
  $Id: prj.h,v 7.2.1.1 2020/03/09 07:34:50 mcalabre Exp mcalabre $
d25 1
a25 1
* WCSLIB 7.3 - C routines that implement the FITS World Coordinate System
d630 1
a630 1
/* Total number of projection parameters; 0 to PVN-1. */
d636 7
a642 7
  PRJERR_SUCCESS      = 0,	/* Success. */
  PRJERR_NULL_POINTER = 1,	/* Null prjprm pointer passed. */
  PRJERR_BAD_PARAM    = 2,	/* Invalid projection parameters. */
  PRJERR_BAD_PIX      = 3,	/* One or more of the (x, y) coordinates were
				   invalid. */
  PRJERR_BAD_WORLD    = 4	/* One or more of the (phi, theta) coordinates
				   were invalid. */
d660 1
a660 1
/* For use in declaring deprojection function prototypes. */
d664 1
a664 1
/* For use in declaring projection function prototypes. */
d670 23
a692 23
  /* Initialization flag (see the prologue above).                          */
  /*------------------------------------------------------------------------*/
  int    flag;			/* Set to zero to force initialization.     */

  /* Parameters to be provided (see the prologue above).                    */
  /*------------------------------------------------------------------------*/
  char   code[4];		/* Three-letter projection code.            */
  double r0;			/* Radius of the generating sphere.         */
  double pv[PVN];		/* Projection parameters.                   */
  double phi0, theta0;		/* Fiducial native coordinates.             */
  int    bounds;		/* Controls bounds checking.                */

  /* Information derived from the parameters supplied.                      */
  /*------------------------------------------------------------------------*/
  char   name[40];		/* Projection name.                         */
  int    category;		/* Projection category.                     */
  int    pvrange;		/* Range of projection parameter indices.   */
  int    simplezen;		/* Is it a simple zenithal projection?      */
  int    equiareal;		/* Is it an equal area projection?          */
  int    conformal;		/* Is it a conformal projection?            */
  int    global;		/* Can it map the whole sphere?             */
  int    divergent;		/* Does the projection diverge in latitude? */
  double x0, y0;		/* Fiducial offsets.                        */
d694 2
a695 2
  /* Error handling                                                         */
  /*------------------------------------------------------------------------*/
d698 5
a702 5
  /* Private                                                                */
  /*------------------------------------------------------------------------*/
  void   *padding;		/* (Dummy inserted for alignment purposes.) */
  double w[10];			/* Intermediate values.                     */
  int    m, n;			/* Intermediate values.                     */
d704 2
a705 2
  int (*prjx2s)(PRJX2S_ARGS);	/* Pointers to the spherical projection and */
  int (*prjs2x)(PRJS2X_ARGS);	/* deprojection functions.                  */
d708 1
a708 1
/* Size of the prjprm struct in int units, used by the Fortran wrappers. */
d712 1
a712 1
/* Use the preprocessor to help declare function prototypes (see above). */
d837 1
a837 1
/* Deprecated. */
d848 1
a848 1
#endif /* WCSLIB_PROJ */
@


7.3.1.1
log
@WCSLIB 7.3 development branch.
@
text
@d25 1
a25 1
  $Id: prj.h,v 7.3 2020/06/03 03:37:02 mcalabre Exp $
@


7.3.1.2
log
@Switched to C99 style commenting (i.e. using //) within the code.
@
text
@d2 1
d25 1
a25 1
  $Id: prj.h,v 7.3.1.1 2020/06/03 03:38:10 mcalabre Exp mcalabre $
d633 1
a633 1
// Total number of projection parameters; 0 to PVN-1.
d639 7
a645 7
  PRJERR_SUCCESS      = 0,	// Success.
  PRJERR_NULL_POINTER = 1,	// Null prjprm pointer passed.
  PRJERR_BAD_PARAM    = 2,	// Invalid projection parameters.
  PRJERR_BAD_PIX      = 3,	// One or more of the (x, y) coordinates were
				// invalid.
  PRJERR_BAD_WORLD    = 4	// One or more of the (phi, theta) coordinates
				// were invalid.
d663 1
a663 1
// For use in declaring deprojection function prototypes.
d667 1
a667 1
// For use in declaring projection function prototypes.
d673 23
a695 23
  // Initialization flag (see the prologue above).
  //--------------------------------------------------------------------------
  int    flag;			// Set to zero to force initialization.

  // Parameters to be provided (see the prologue above).
  //--------------------------------------------------------------------------
  char   code[4];		// Three-letter projection code.
  double r0;			// Radius of the generating sphere.
  double pv[PVN];		// Projection parameters.
  double phi0, theta0;		// Fiducial native coordinates.
  int    bounds;		// Controls bounds checking.

  // Information derived from the parameters supplied.
  //--------------------------------------------------------------------------
  char   name[40];		// Projection name.
  int    category;		// Projection category.
  int    pvrange;		// Range of projection parameter indices.
  int    simplezen;		// Is it a simple zenithal projection?
  int    equiareal;		// Is it an equal area projection?
  int    conformal;		// Is it a conformal projection?
  int    global;		// Can it map the whole sphere?
  int    divergent;		// Does the projection diverge in latitude?
  double x0, y0;		// Fiducial offsets.
d697 2
a698 2
  // Error handling
  //--------------------------------------------------------------------------
d701 5
a705 5
  // Private
  //--------------------------------------------------------------------------
  void   *padding;		// (Dummy inserted for alignment purposes.)
  double w[10];			// Intermediate values.
  int    m, n;			// Intermediate values.
d707 2
a708 2
  int (*prjx2s)(PRJX2S_ARGS);	// Pointers to the spherical projection and
  int (*prjs2x)(PRJS2X_ARGS);	// deprojection functions.
d711 1
a711 1
// Size of the prjprm struct in int units, used by the Fortran wrappers.
d715 1
a715 1
// Use the preprocessor to help declare function prototypes (see above).
d840 1
a840 1
// Deprecated.
d851 1
a851 1
#endif // WCSLIB_PROJ
@


7.3.1.3
log
@Updated date in copyright notice.
@
text
@d3 1
a3 1
  Copyright (C) 1995-2021, Mark Calabretta
d24 1
a24 1
  $Id: prj.h,v 7.3.1.2 2020/08/17 11:19:09 mcalabre Exp mcalabre $
@


7.3.1.4
log
@Removed my email address from the copyright notice.
@
text
@d20 2
d24 1
a24 1
  $Id: prj.h,v 7.3.1.3 2021/01/19 14:09:10 mcalabre Exp mcalabre $
@


7.2
log
@WCSLIB 7.2
@
text
@d3 1
a3 1
  WCSLIB 7.2 - an implementation of the FITS WCS standard.
d25 1
a25 1
  $Id: prj.h,v 7.1.1.1 2019/12/31 13:28:19 mcalabre Exp mcalabre $
d28 1
a28 1
* WCSLIB 7.2 - C routines that implement the FITS World Coordinate System
@


7.2.1.1
log
@WCSLIB 7.2 development branch.
@
text
@d25 1
a25 1
  $Id: prj.h,v 7.2 2020/03/09 07:31:23 mcalabre Exp $
@


7.1
log
@WCSLIB 7.1
@
text
@d3 1
a3 1
  WCSLIB 7.1 - an implementation of the FITS WCS standard.
d25 1
a25 1
  $Id: prj.h,v 6.4.1.2 2019/12/31 03:28:03 mcalabre Exp mcalabre $
d28 1
a28 1
* WCSLIB 7.1 - C routines that implement the FITS World Coordinate System
@


7.1.1.1
log
@WCSLIB 7.1 development branch.
@
text
@d25 1
a25 1
  $Id: prj.h,v 7.1 2019/12/31 13:25:19 mcalabre Exp $
@


6.4
log
@WCSLIB 6.4
@
text
@d3 2
a4 2
  WCSLIB 6.4 - an implementation of the FITS WCS standard.
  Copyright (C) 1995-2019, Mark Calabretta
d25 1
a25 1
  $Id: prj.h,v 6.3.1.1 2019/07/12 07:34:37 mcalabre Exp mcalabre $
d28 1
a28 1
* WCSLIB 6.4 - C routines that implement the FITS World Coordinate System
@


6.4.1.1
log
@WCSLIB 6.4 development branch.
@
text
@d25 1
a25 1
  $Id: prj.h,v 6.4 2019/08/15 09:30:18 mcalabre Exp $
@


6.4.1.2
log
@Updated date in copyright notice.
@
text
@d4 1
a4 1
  Copyright (C) 1995-2020, Mark Calabretta
d25 1
a25 1
  $Id: prj.h,v 6.4.1.1 2019/08/15 09:31:29 mcalabre Exp mcalabre $
@


6.3
log
@WCSLIB 6.3
@
text
@d3 1
a3 1
  WCSLIB 6.3 - an implementation of the FITS WCS standard.
d25 1
a25 1
  $Id: prj.h,v 6.2.1.3 2019/07/11 02:19:06 mcalabre Exp mcalabre $
d28 1
a28 1
* WCSLIB 6.3 - C routines that implement the FITS World Coordinate System
@


6.3.1.1
log
@WCSLIB 6.3 development branch.
@
text
@d25 1
a25 1
  $Id: prj.h,v 6.3 2019/07/12 07:33:39 mcalabre Exp $
@


6.2
log
@WCSLIB 6.2
@
text
@d3 2
a4 2
  WCSLIB 6.2 - an implementation of the FITS WCS standard.
  Copyright (C) 1995-2018, Mark Calabretta
d25 1
a25 1
  $Id: prj.h,v 6.1.1.2 2018/10/20 09:30:50 mcalabre Exp mcalabre $
d28 1
a28 1
* WCSLIB 6.2 - C routines that implement the FITS World Coordinate System
d156 5
@


6.2.1.1
log
@WCSLIB 6.2 development branch.
@
text
@d25 1
a25 1
  $Id: prj.h,v 6.2 2018/10/20 10:03:13 mcalabre Exp $
@


6.2.1.2
log
@Updated date in copyright notice.
@
text
@d4 1
a4 1
  Copyright (C) 1995-2019, Mark Calabretta
d25 1
a25 1
  $Id: prj.h,v 6.2.1.1 2018/10/20 10:04:15 mcalabre Exp mcalabre $
@


6.2.1.3
log
@In the usage notes for prjini(), note that, before reinitialising a prjprm
struct, prjfree() should be used to free any memory that may have been
allocated for an error message.
@
text
@d25 1
a25 1
  $Id: prj.h,v 6.2.1.2 2019/05/10 01:56:50 mcalabre Exp mcalabre $
a155 5
*
* PLEASE NOTE: If the prjprm struct has already been initialized, then before
* reinitializing, it prjfree() should be used to free any memory that may have
* been allocated to store an error message.  A memory leak may otherwise
* result.
@


6.1
log
@WCSLIB 6.1
@
text
@d3 1
a3 1
  WCSLIB 6.1 - an implementation of the FITS WCS standard.
d25 1
a25 1
  $Id: prj.h,v 5.20.1.1 2018/10/05 05:33:33 mcalabre Exp mcalabre $
d28 1
a28 1
* WCSLIB 6.1 - C routines that implement the FITS World Coordinate System
d715 2
a716 2
int prjbchk(double tol, int nx, int ny, int spt, double phi[], double theta[],
           int stat[]);
@


6.1.1.1
log
@WCSLIB 6.1 development branch.
@
text
@d25 1
a25 1
  $Id: prj.h,v 6.1 2018/10/19 08:35:17 mcalabre Exp $
@


6.1.1.2
log
@Fix for doxygen manual generation - changed the argument names in the
prjbchk() prototype to match those documented in the prologue.
@
text
@d25 1
a25 1
  $Id: prj.h,v 6.1.1.1 2018/10/19 08:36:15 mcalabre Exp mcalabre $
d715 2
a716 2
int prjbchk(double tol, int nphi, int ntheta, int spt, double phi[],
            double theta[], int stat[]);
@


5.20
log
@WCSLIB 5.20
@
text
@d3 1
a3 1
  WCSLIB 5.20 - an implementation of the FITS WCS standard.
d25 1
a25 1
  $Id: prj.h,v 5.19.1.1 2018/07/26 15:41:40 mcalabre Exp mcalabre $
d28 1
a28 1
* WCSLIB 5.20 - C routines that implement the FITS World Coordinate System
@


5.20.1.1
log
@WCSLIB 5.20 development branch.
@
text
@d25 1
a25 1
  $Id: prj.h,v 5.20 2018/10/05 05:32:41 mcalabre Exp $
@


5.19
log
@WCSLIB 5.19
@
text
@d3 1
a3 1
  WCSLIB 5.19 - an implementation of the FITS WCS standard.
d25 1
a25 1
  $Id: prj.h,v 5.18.1.1 2018/01/10 08:33:04 mcalabre Exp mcalabre $
d28 1
a28 1
* WCSLIB 5.19 - C routines that implement the FITS World Coordinate System
@


5.19.1.1
log
@WCSLIB 5.19 development branch.
@
text
@d25 1
a25 1
  $Id: prj.h,v 5.19 2018/07/26 15:37:04 mcalabre Exp $
@


5.18
log
@WCSLIB 5.18
@
text
@d3 1
a3 1
  WCSLIB 5.18 - an implementation of the FITS WCS standard.
d25 1
a25 1
  $Id: prj.h,v 5.17.1.2 2018/01/10 08:25:34 mcalabre Exp mcalabre $
d28 1
a28 1
* WCSLIB 5.18 - C routines that implement the FITS World Coordinate System
@


5.18.1.1
log
@WCSLIB 5.18 development branch.
@
text
@d25 1
a25 1
  $Id: prj.h,v 5.18 2018/01/10 08:32:14 mcalabre Exp $
@


5.17
log
@WCSLIB 5.17
@
text
@d3 2
a4 2
  WCSLIB 5.17 - an implementation of the FITS WCS standard.
  Copyright (C) 1995-2017, Mark Calabretta
d25 1
a25 1
  $Id: prj.h,v 5.16.1.1 2017/01/15 04:28:59 mcalabre Exp mcalabre $
d28 1
a28 1
* WCSLIB 5.17 - C routines that implement the FITS World Coordinate System
@


5.17.1.1
log
@WCSLIB 5.17 development branch.
@
text
@d25 1
a25 1
  $Id: prj.h,v 5.17 2017/09/18 08:44:23 mcalabre Exp $
@


5.17.1.2
log
@Updated date in copyright notice.
@
text
@d4 1
a4 1
  Copyright (C) 1995-2018, Mark Calabretta
d25 1
a25 1
  $Id: prj.h,v 5.17.1.1 2017/09/18 08:45:59 mcalabre Exp mcalabre $
@


5.16
log
@WCSLIB 5.16
@
text
@d3 1
a3 1
  WCSLIB 5.16 - an implementation of the FITS WCS standard.
d25 1
a25 1
  $Id: prj.h,v 5.15.1.2 2017/01/15 04:14:00 mcalabre Exp mcalabre $
d28 1
a28 1
* WCSLIB 5.16 - C routines that implement the FITS World Coordinate System
@


5.16.1.1
log
@WCSLIB 5.16 development branch.
@
text
@d25 1
a25 1
  $Id: prj.h,v 5.16 2017/01/15 04:25:01 mcalabre Exp $
@


5.15
log
@WCSLIB 5.15
@
text
@d3 2
a4 2
  WCSLIB 5.15 - an implementation of the FITS WCS standard.
  Copyright (C) 1995-2016, Mark Calabretta
d25 1
a25 1
  $Id: prj.h,v 5.14.1.1 2016/02/07 10:52:44 mcalabre Exp mcalabre $
d28 1
a28 1
* WCSLIB 5.15 - C routines that implement the FITS World Coordinate System
@


5.15.1.1
log
@WCSLIB 5.15 development branch.
@
text
@d25 1
a25 1
  $Id: prj.h,v 5.15 2016/04/05 12:55:10 mcalabre Exp $
@


5.15.1.2
log
@Updated date in copyright notice.
@
text
@d4 1
a4 1
  Copyright (C) 1995-2017, Mark Calabretta
d25 1
a25 1
  $Id: prj.h,v 5.15.1.1 2016/04/05 12:58:35 mcalabre Exp mcalabre $
@


5.14
log
@WCSLIB 5.14
@
text
@d3 1
a3 1
  WCSLIB 5.14 - an implementation of the FITS WCS standard.
d25 1
a25 1
  $Id: prj.h,v 5.13.1.1 2016/01/26 08:54:32 mcalabre Exp mcalabre $
d28 1
a28 1
* WCSLIB 5.14 - C routines that implement the FITS World Coordinate System
@


5.14.1.1
log
@WCSLIB 5.14 development branch.
@
text
@d25 1
a25 1
  $Id: prj.h,v 5.14 2016/02/07 10:49:31 mcalabre Exp $
@


5.13
log
@WCSLIB 5.13
@
text
@d3 1
a3 1
  WCSLIB 5.13 - an implementation of the FITS WCS standard.
d25 1
a25 1
  $Id: prj.h,v 5.12.1.2 2016/01/25 05:17:04 mcalabre Exp mcalabre $
d28 1
a28 1
* WCSLIB 5.13 - C routines that implement the FITS World Coordinate System
@


5.13.1.1
log
@WCSLIB 5.13 development branch.
@
text
@d25 1
a25 1
  $Id: prj.h,v 5.13 2016/01/26 08:51:13 mcalabre Exp $
@


5.12
log
@WCSLIB 5.12
@
text
@d3 2
a4 2
  WCSLIB 5.12 - an implementation of the FITS WCS standard.
  Copyright (C) 1995-2015, Mark Calabretta
d25 1
a25 1
  $Id: prj.h,v 5.11.1.1 2015/10/18 09:16:27 mcalabre Exp mcalabre $
d28 1
a28 1
* WCSLIB 5.12 - C routines that implement the FITS World Coordinate System
@


5.12.1.1
log
@WCSLIB 5.12 development branch.
@
text
@d25 1
a25 1
  $Id: prj.h,v 5.12 2015/11/15 02:13:00 mcalabre Exp $
@


5.12.1.2
log
@Updated date in copyright notice.
@
text
@d4 1
a4 1
  Copyright (C) 1995-2016, Mark Calabretta
d25 1
a25 1
  $Id: prj.h,v 5.12.1.1 2015/11/15 02:16:14 mcalabre Exp mcalabre $
@


5.11
log
@WCSLIB 5.11
@
text
@d3 1
a3 1
  WCSLIB 5.11 - an implementation of the FITS WCS standard.
d25 1
a25 1
  $Id: prj.h,v 5.10.1.1 2015/10/09 08:22:35 mcalabre Exp mcalabre $
d28 1
a28 1
* WCSLIB 5.11 - C routines that implement the FITS World Coordinate System
@


5.11.1.1
log
@WCSLIB 5.11 development branch.
@
text
@d25 1
a25 1
  $Id: prj.h,v 5.11 2015/10/18 09:13:05 mcalabre Exp $
@


5.10
log
@WCSLIB 5.10
@
text
@d3 1
a3 1
  WCSLIB 5.10 - an implementation of the FITS WCS standard.
d25 1
a25 1
  $Id: prj.h,v 5.9.1.1 2015/07/21 09:28:07 mcalabre Exp mcalabre $
d28 1
a28 1
* WCSLIB 5.10 - C routines that implement the FITS World Coordinate System
@


5.10.1.1
log
@WCSLIB 5.10 development branch.
@
text
@d25 1
a25 1
  $Id: prj.h,v 5.10 2015/10/09 08:19:15 mcalabre Exp $
@


5.9
log
@WCSLIB 5.9
@
text
@d3 1
a3 1
  WCSLIB 5.9 - an implementation of the FITS WCS standard.
d25 1
a25 1
  $Id: prj.h,v 5.8.1.1 2015/07/08 11:07:18 mcalabre Exp mcalabre $
d28 1
a28 1
* WCSLIB 5.9 - C routines that implement the FITS World Coordinate System
@


5.9.1.1
log
@WCSLIB 5.9 development branch.
@
text
@d25 1
a25 1
  $Id: prj.h,v 5.9 2015/07/21 09:20:01 mcalabre Exp $
@


5.8
log
@WCSLIB 5.8
@
text
@d3 1
a3 1
  WCSLIB 5.8 - an implementation of the FITS WCS standard.
d25 1
a25 1
  $Id: prj.h,v 5.7.1.1 2015/06/29 02:47:24 mcalabre Exp mcalabre $
d28 1
a28 1
* WCSLIB 5.8 - C routines that implement the FITS World Coordinate System
@


5.8.1.1
log
@WCSLIB 5.8 development branch.
@
text
@d25 1
a25 1
  $Id: prj.h,v 5.8 2015/07/08 11:03:59 mcalabre Exp $
@


5.7
log
@WCSLIB 5.7
@
text
@d3 1
a3 1
  WCSLIB 5.7 - an implementation of the FITS WCS standard.
d25 1
a25 1
  $Id: prj.h,v 5.6.1.2 2015/06/18 08:11:52 mcalabre Exp mcalabre $
d28 1
a28 1
* WCSLIB 5.7 - C routines that implement the FITS World Coordinate System
@


5.7.1.1
log
@WCSLIB 5.7 development branch.
@
text
@d25 1
a25 1
  $Id: prj.h,v 5.7 2015/06/29 02:44:16 mcalabre Exp $
@


5.6
log
@WCSLIB 5.6
@
text
@d3 1
a3 1
  WCSLIB 5.6 - an implementation of the FITS WCS standard.
d25 1
a25 1
  $Id: prj.h,v 5.5.1.1 2015/05/05 13:21:00 mcalabre Exp mcalabre $
d28 1
a28 1
* WCSLIB 5.6 - C routines that implement the FITS World Coordinate System
d57 4
a60 2
* an error message, and prjprt() prints its contents.  prjbchk() performs
* bounds checking on native spherical coordinates.
d80 1
d197 19
d714 1
@


5.6.1.1
log
@WCSLIB 5.6 development branch.
@
text
@d25 1
a25 1
  $Id: prj.h,v 5.6 2015/06/14 07:11:24 mcalabre Exp $
@


5.6.1.2
log
@Added prjperr() for convenience in reporting errors.
@
text
@d25 1
a25 1
  $Id: prj.h,v 5.6.1.1 2015/06/14 07:14:44 mcalabre Exp mcalabre $
d57 2
a58 4
* an error message, and prjprt() prints its contents.
*
* prjperr() prints the error message(s) (if any) stored in a prjprm struct.
* prjbchk() performs bounds checking on native spherical coordinates.
a77 1
*   - prjperr()               Print error message (if any).
a193 19
* prjperr() - Print error messages from a prjprm struct
* -----------------------------------------------------
* prjperr() prints the error message(s) (if any) stored in a prjprm struct.
* If there are no errors then nothing is printed.  It uses wcserr_prt(), q.v.
*
* Given:
*   prj       const struct prjprm*
*                       Projection parameters.
*
*   prefix    const char *
*                       If non-NULL, each output line will be prefixed with
*                       this string.
*
* Function return value:
*             int       Status return value:
*                         0: Success.
*                         1: Null prjprm pointer passed.
*
*
a691 1
int prjperr(const struct prjprm *prj, const char *prefix);
@


5.5
log
@WCSLIB 5.5
@
text
@d3 1
a3 1
  WCSLIB 5.5 - an implementation of the FITS WCS standard.
d25 1
a25 1
  $Id: prj.h,v 5.4.1.2 2015/04/23 11:03:11 mcalabre Exp mcalabre $
d28 1
a28 1
* WCSLIB 5.5 - C routines that implement the FITS World Coordinate System
@


5.5.1.1
log
@WCSLIB 5.5 development branch.
@
text
@d25 1
a25 1
  $Id: prj.h,v 5.5 2015/05/05 13:16:31 mcalabre Exp $
@


5.4
log
@WCSLIB 5.4
@
text
@d3 1
a3 1
  WCSLIB 5.4 - an implementation of the FITS WCS standard.
d25 1
a25 1
  $Id: prj.h,v 5.3.1.1 2015/04/21 02:54:02 mcalabre Exp mcalabre $
d28 3
a30 11
* WCSLIB 5.4 - C routines that implement the spherical map projections
* recognized by the FITS World Coordinate System (WCS) standard.  Refer to
*
*   "Representations of world coordinates in FITS",
*   Greisen, E.W., & Calabretta, M.R. 2002, A&A, 395, 1061 (Paper I)
*
*   "Representations of celestial coordinates in FITS",
*   Calabretta, M.R., & Greisen, E.W. 2002, A&A, 395, 1077 (Paper II)
*
* Refer to the README file provided with WCSLIB for an overview of the
* library.
d35 19
a53 5
* These routines implement the spherical map projections defined by the FITS
* WCS standard.  They are based on the prjprm struct which contains all
* information needed for the computations.  The struct contains some members
* that must be set by the user, and others that are maintained by these
* routines, somewhat like a C++ class but with no encapsulation.
@


5.4.1.1
log
@WCSLIB 5.4 development branch.
@
text
@d25 1
a25 1
  $Id: prj.h,v 5.4 2015/04/21 14:41:05 mcalabre Exp $
@


5.4.1.2
log
@Boilerplate change to the prologue to ensure that references to the WCS
Papers appear in the doxygen manual.  Also added references to HPX and XPH.
@
text
@d25 1
a25 1
  $Id: prj.h,v 5.4.1.1 2015/04/21 14:44:28 mcalabre Exp mcalabre $
d28 11
a38 3
* WCSLIB 5.4 - C routines that implement the FITS World Coordinate System
* (WCS) standard.  Refer to the README file provided with WCSLIB for an
* overview of the library.
d43 5
a47 19
* Routines in this suite  implement the spherical map projections defined by
* the FITS World Coordinate System (WCS) standard, as described in
*
=   "Representations of world coordinates in FITS",
=   Greisen, E.W., & Calabretta, M.R. 2002, A&A, 395, 1061 (WCS Paper I)
=
=   "Representations of celestial coordinates in FITS",
=   Calabretta, M.R., & Greisen, E.W. 2002, A&A, 395, 1077 (WCS Paper II)
=
=   "Mapping on the HEALPix grid",
=   Calabretta, M.R., & Roukema, B.F. 2007, MNRAS, 381, 865 (WCS Paper V)
=
=   "Representing the 'Butterfly' Projection in FITS -- Projection Code XPH",
=   Calabretta, M.R., & Lowe, S.R. 2013, PASA, 30, e050 (WCS Paper VI)
*
* These routines are based on the prjprm struct which contains all information
* needed for the computations.  The struct contains some members that must be
* set by the user, and others that are maintained by these routines, somewhat
* like a C++ class but with no encapsulation.
@


5.3
log
@WCSLIB 5.3
@
text
@d3 1
a3 1
  WCSLIB 5.3 - an implementation of the FITS WCS standard.
d25 1
a25 1
  $Id: prj.h,v 5.2.1.1 2015/04/15 12:39:14 mcalabre Exp mcalabre $
d28 1
a28 1
* WCSLIB 5.3 - C routines that implement the spherical map projections
@


5.3.1.1
log
@WCSLIB 5.3 development branch.
@
text
@d25 1
a25 1
  $Id: prj.h,v 5.3 2015/04/21 02:50:51 mcalabre Exp $
@


5.2
log
@WCSLIB 5.2
@
text
@d3 1
a3 1
  WCSLIB 5.2 - an implementation of the FITS WCS standard.
d25 1
a25 1
  $Id: prj.h,v 5.1.1.1 2015/04/07 11:01:10 mcalabre Exp mcalabre $
d28 1
a28 1
* WCSLIB 5.2 - C routines that implement the spherical map projections
@


5.2.1.1
log
@WCSLIB 5.2 development branch.
@
text
@d25 1
a25 1
  $Id: prj.h,v 5.2 2015/04/15 12:35:07 mcalabre Exp $
@


5.1
log
@WCSLIB 5.1
@
text
@d3 1
a3 1
  WCSLIB 5.1 - an implementation of the FITS WCS standard.
d25 1
a25 1
  $Id: prj.h,v 5.0.1.1 2015/04/05 12:28:00 mcalabre Exp mcalabre $
d28 1
a28 1
* WCSLIB 5.1 - C routines that implement the spherical map projections
@


5.1.1.1
log
@WCSLIB 5.1 development branch.
@
text
@d25 1
a25 1
  $Id: prj.h,v 5.1 2015/04/07 10:56:36 mcalabre Exp $
@


5.0
log
@WCSLIB 5.0
@
text
@d3 1
a3 1
  WCSLIB 5.0 - an implementation of the FITS WCS standard.
d25 1
a25 1
  $Id: prj.h,v 4.25.1.4 2015/04/05 05:58:16 mcalabre Exp mcalabre $
d28 1
a28 1
* WCSLIB 5.0 - C routines that implement the spherical map projections
@


5.0.1.1
log
@WCSLIB 5.0 development branch.
@
text
@d25 1
a25 1
  $Id: prj.h,v 5.0 2015/04/05 12:24:59 mcalabre Exp $
@


4.25
log
@WCSLIB 4.25
@
text
@d3 2
a4 2
  WCSLIB 4.25 - an implementation of the FITS WCS standard.
  Copyright (C) 1995-2014, Mark Calabretta
d25 1
a25 1
  $Id: prj.h,v 4.24.1.1 2014/09/18 15:28:09 mcalabre Exp mcalabre $
d28 1
a28 1
* WCSLIB 4.25 - C routines that implement the spherical map projections
d489 3
d563 1
a563 1
*     (Returned) If enabled, when an error status is returned this struct
d581 1
a581 1
*     (Returned) Pointer to the projection ...
a593 2

#include "wcserr.h"
@


4.25.1.1
log
@WCSLIB 4.25 development branch.
@
text
@d25 1
a25 1
  $Id: prj.h,v 4.25 2014/12/14 14:29:36 mcalabre Exp $
@


4.25.1.2
log
@Updated date in copyright notice.
@
text
@d4 1
a4 1
  Copyright (C) 1995-2015, Mark Calabretta
d25 1
a25 1
  $Id: prj.h,v 4.25.1.1 2014/12/14 14:32:45 mcalabre Exp mcalabre $
@


4.25.1.3
log
@No need to include wcserr.h.  Prologue wording tweaks.
@
text
@d25 1
a25 1
  $Id: prj.h,v 4.25.1.2 2015/01/06 01:01:06 mcalabre Exp mcalabre $
d560 1
a560 1
*     (Returned) If enabled, when an error status is returned, this struct
d578 1
a578 1
*     (Returned) Pointer to the spherical projection ...
d591 2
@


4.25.1.4
log
@Tweaks to prologue.
@
text
@d25 1
a25 1
  $Id: prj.h,v 4.25.1.3 2015/04/03 01:14:14 mcalabre Exp mcalabre $
a487 3
*
*     It is not necessary to reset the prjprm struct (via prjset() or
*     ???set()) when prjprm::bounds is changed.
@


4.24
log
@WCSLIB 4.24
@
text
@d3 1
a3 1
  WCSLIB 4.24 - an implementation of the FITS WCS standard.
d25 1
a25 1
  $Id: prj.h,v 4.23.1.1 2014/05/13 05:53:49 mcalabre Exp mcalabre $
d28 1
a28 1
* WCSLIB 4.24 - C routines that implement the spherical map projections
@


4.24.1.1
log
@WCSLIB 4.24 development branch.
@
text
@d25 1
a25 1
  $Id: prj.h,v 4.24 2014/09/18 15:25:00 mcalabre Exp $
@


4.23
log
@WCSLIB 4.23
@
text
@d3 1
a3 1
  WCSLIB 4.23 - an implementation of the FITS WCS standard.
d25 1
a25 1
  $Id: prj.h,v 4.22.1.1 2014/04/12 15:06:32 mcalabre Exp mcalabre $
d28 1
a28 1
* WCSLIB 4.23 - C routines that implement the spherical map projections
@


4.23.1.1
log
@WCSLIB 4.23 development branch.
@
text
@d25 1
a25 1
  $Id: prj.h,v 4.23 2014/05/13 05:50:51 mcalabre Exp $
@


4.22
log
@WCSLIB 4.22
@
text
@d3 1
a3 1
  WCSLIB 4.22 - an implementation of the FITS WCS standard.
d25 1
a25 1
  $Id: prj.h,v 4.21.1.1 2014/03/24 05:15:28 mcalabre Exp mcalabre $
d28 1
a28 1
* WCSLIB 4.22 - C routines that implement the spherical map projections
@


4.22.1.1
log
@WCSLIB 4.22 development branch.
@
text
@d25 1
a25 1
  $Id: prj.h,v 4.22 2014/04/12 15:03:52 mcalabre Exp $
@


4.21
log
@WCSLIB 4.21
@
text
@d3 1
a3 1
  WCSLIB 4.21 - an implementation of the FITS WCS standard.
d25 1
a25 1
  $Id: prj.h,v 4.20.1.3 2014/03/22 05:10:57 mcalabre Exp mcalabre $
d28 1
a28 1
* WCSLIB 4.21 - C routines that implement the spherical map projections
@


4.21.1.1
log
@WCSLIB 4.21 development branch.
@
text
@d25 1
a25 1
  $Id: prj.h,v 4.21 2014/03/24 05:12:27 mcalabre Exp $
@


4.20
log
@WCSLIB 4.20
@
text
@d3 2
a4 2
  WCSLIB 4.20 - an implementation of the FITS WCS standard.
  Copyright (C) 1995-2013, Mark Calabretta
d25 1
a25 1
  $Id: prj.h,v 4.19.1.3 2013/12/10 23:05:27 mcalabre Exp mcalabre $
d28 1
a28 1
* WCSLIB 4.20 - C routines that implement the spherical map projections
d51 2
a52 1
* an error message, and prjprt() prints its contents.
d70 3
a72 1
*   - prjprt()                Routine to print the prjprm struct.
d125 5
a129 2
* exist no check is made that the value of phi and theta obtained lie within
* the ranges [-180,180] for phi, and [-90,90] for theta.
d188 37
d278 1
a278 1
*   stat      int[]     Status return value for each vector element:
d318 1
a318 1
*   stat      int[]     Status return value for each vector element:
d374 1
a374 1
*   stat      int[]     Status return value for each vector element:
d412 1
a412 1
*   stat      int[]     Status return value for each vector element:
d479 9
a487 6
*     (Given) Controls strict bounds checking.  If bounds&1 then enable bounds
*     checking for the sky-to-pixel (s2x) transformation for the AZP, SZP,
*     TAN, SIN, ZPN, and COP projections.  If bounds&2 then enable bounds
*     checking for the pixel-to-sky transformation for the HPX and XPH
*     projections.  Set to 3 by prjini() by default which enables both.  Zero
*     it to disable all checking.
d649 1
a649 1
  int    bounds;		/* Enable strict bounds checking.           */
d685 2
@


4.20.1.1
log
@WCSLIB 4.20 development branch.
@
text
@d25 1
a25 1
  $Id: prj.h,v 4.20 2013/12/18 05:42:49 mcalabre Exp $
@


4.20.1.2
log
@Updated date in copyright notice.
@
text
@d4 1
a4 1
  Copyright (C) 1995-2014, Mark Calabretta
d25 1
a25 1
  $Id: prj.h,v 4.20.1.1 2013/12/18 05:46:55 mcalabre Exp mcalabre $
@


4.20.1.3
log
@Added new function prjbchk() and augmented the documentation for
prjprm::bounds.
@
text
@d25 1
a25 1
  $Id: prj.h,v 4.20.1.2 2014/03/21 06:32:19 mcalabre Exp mcalabre $
d51 1
a51 2
* an error message, and prjprt() prints its contents.  prjbchk() performs
* bounds checking on native spherical coordinates.
d69 1
a69 3
*   - prjfree()               Reclaim memory allocated for error messages.
*   - prjprt()                Print the prjprm struct.
*   - prjbchk()               Bounds checking on native coordinates.
d122 2
a123 5
* exist, an optional check is made that the value of phi and theta obtained
* lie within the ranges [-180,180] for phi, and [-90,90] for theta.  This
* check, performed by prjbchk(), is enabled by default.  It may be disabled by
* setting prjprm::bounds%4 to 0 (rather than 1); the projections need not be
* reinitialized.
a181 37
* prjbchk() - Bounds checking on native coordinates
* -------------------------------------------------
* prjbchk() performs bounds checking on native spherical coordinates.  As
* returned by the deprojection (x2s) routines, native longitude is expected
* to lie in the closed interval [-180,180], with latitude in [-90,90].
*
* A tolerance may be specified to provide a small allowance for numerical
* imprecision.  Values that lie outside the allowed range by not more than
* the specified tolerance will be adjusted back into range.
*
* If prjprm::bounds&4 is set, as it is by prjini(), then prjbchk() will be
* invoked automatically by the Cartesian-to-spherical deprojection (x2s)
* routines with an appropriate tolerance set for each projection.
*
* Given:
*   tol       double    Tolerance for the bounds check [deg].
*
*   nphi,
*   ntheta    int       Vector lengths.
*
*   spt       int       Vector stride.
*
* Given and returned:
*   phi,theta double[]  Native longitude and latitude (phi,theta) [deg].
*
* Returned:
*   stat      int[]     Status value for each vector element:
*                         0: Valid value of (phi,theta).
*                         1: Invalid value.
*
* Function return value:
*             int       Status return value:
*                         0: Success.
*                         1: One or more of the (phi,theta) coordinates
*                            were, invalid, as indicated by the stat vector.
*
*
d235 1
a235 1
*   stat      int[]     Status value for each vector element:
d275 1
a275 1
*   stat      int[]     Status value for each vector element:
d331 1
a331 1
*   stat      int[]     Status value for each vector element:
d369 1
a369 1
*   stat      int[]     Status value for each vector element:
d436 6
a441 9
*     (Given) Controls bounds checking.  If bounds&1 then enable strict bounds
*     checking for the spherical-to-Cartesian (s2x) transformation for the
*     AZP, SZP, TAN, SIN, ZPN, and COP projections.  If bounds&2 then enable
*     strict bounds checking for the Cartesian-to-spherical transformation
*     (x2s) for the HPX and XPH projections.  If bounds&4 then the Cartesian-
*     to-spherical transformations (x2s) will invoke prjbchk() to perform
*     bounds checking on the computed native coordinates, with a tolerance set
*     to suit each projection.  bounds is set to 7 by prjini() by default
*     which enables all checks.  Zero it to disable all checking.
d603 1
a603 1
  int    bounds;		/* Controls bounds checking.                */
a638 2
int prjbchk(double tol, int nx, int ny, int spt, double phi[], double theta[],
           int stat[]);
@


4.19
log
@WCSLIB 4.19
@
text
@d3 1
a3 1
  WCSLIB 4.19 - an implementation of the FITS WCS standard.
d25 1
a25 1
  $Id: prj.h,v 4.18.1.1 2013/07/13 10:02:37 mcalabre Exp mcalabre $
d28 1
a28 1
* WCSLIB 4.19 - C routines that implement the spherical map projections
d114 3
a116 2
* strict bounds checking may be relaxed at any time by setting prjprm::bounds
* to 0 (rather than 1); the projections need not be reinitialized.
d436 6
a441 2
*     (Given) Controls strict bounds checking for the AZP, SZP, TAN, SIN, ZPN,
*     and COP projections; set to zero to disable checking.
@


4.19.1.1
log
@WCSLIB 4.19 development branch.
@
text
@d25 1
a25 1
  $Id: prj.h,v 4.19 2013/09/29 14:17:51 mcalabre Exp $
@


4.19.1.2
log
@Extended the interpretation of prjprm::bounds to allow bounds checking to
be disabled for the Cartesian-to-spherical transformation (x2s) for the HPX
and XPH projections (enabled by default by prjini()).
@
text
@d25 1
a25 1
  $Id: prj.h,v 4.19.1.1 2013/09/29 14:20:38 mcalabre Exp mcalabre $
d435 2
a436 6
*     (Given) Controls strict bounds checking.  If bounds&1 then enable bounds
*     checking for the sky-to-pixel (s2x) transformation for the AZP, SZP,
*     TAN, SIN, ZPN, and COP projections.  If bounds&2 then enable bounds
*     checking for the pixel-to-sky transformation for the HPX and XPH
*     projections.  Set to 3 by prjini() by default which enables both.  Zero
*     it to disable all checking.
@


4.19.1.3
log
@Minor tweak for the previous change.
@
text
@d25 1
a25 1
  $Id: prj.h,v 4.19.1.2 2013/10/06 03:59:39 mcalabre Exp mcalabre $
d114 2
a115 3
* strict bounds checking may be relaxed at any time by setting
* prjprm::bounds%2 to 0 (rather than 1); the projections need not be
* reinitialized.
@


4.18
log
@WCSLIB 4.18
@
text
@d3 1
a3 1
  WCSLIB 4.18 - an implementation of the FITS WCS standard.
d25 1
a25 1
  $Id: prj.h,v 4.17.1.2 2013/07/12 04:04:58 mcalabre Exp mcalabre $
d28 1
a28 1
* WCSLIB 4.18 - C routines that implement the spherical map projections
@


4.18.1.1
log
@WCSLIB 4.18 development branch.
@
text
@d25 1
a25 1
  $Id: prj.h,v 4.18 2013/07/13 10:00:04 mcalabre Exp $
@


4.17
log
@WCSLIB 4.17
@
text
@d3 1
a3 1
  WCSLIB 4.17 - an implementation of the FITS WCS standard.
d25 1
a25 1
  $Id: prj.h,v 4.16.1.2 2013/01/29 05:09:44 cal103 Exp cal103 $
d28 1
a28 1
* WCSLIB 4.17 - C routines that implement the spherical map projections
d100 1
d568 1
a568 1
extern const char prj_codes[27][4];
d746 4
@


4.17.1.1
log
@WCSLIB 4.17 development branch.
@
text
@d25 1
a25 1
  $Id: prj.h,v 4.17 2013/01/29 05:29:20 cal103 Exp $
@


4.17.1.2
log
@Added the XPH projection.
@
text
@d25 1
a25 1
  $Id: prj.h,v 4.17.1.1 2013/01/29 05:32:32 cal103 Exp cal103 $
a99 1
*   - xphset(), xphx2s(), xphs2x():   XPH (HEALPix polar, aka "butterfly")
d567 1
a567 1
extern const char prj_codes[28][4];
a744 4

int xphset(struct prjprm *prj);
int xphx2s(PRJX2S_ARGS);
int xphs2x(PRJS2X_ARGS);
@


4.16
log
@WCSLIB 4.16
@
text
@d3 2
a4 2
  WCSLIB 4.16 - an implementation of the FITS WCS standard.
  Copyright (C) 1995-2012, Mark Calabretta
d25 1
a25 1
  $Id: prj.h,v 4.15.1.1 2012/09/26 14:27:51 cal103 Exp cal103 $
d28 1
a28 1
* WCSLIB 4.16 - C routines that implement the spherical map projections
@


4.16.1.1
log
@WCSLIB 4.16 development branch.
@
text
@d25 1
a25 1
  $Id: prj.h,v 4.16 2012/11/07 04:42:44 cal103 Exp $
@


4.16.1.2
log
@Updated date in copyright notice.
@
text
@d4 1
a4 1
  Copyright (C) 1995-2013, Mark Calabretta
d25 1
a25 1
  $Id: prj.h,v 4.16.1.1 2012/11/07 04:45:56 cal103 Exp cal103 $
@


4.15
log
@WCSLIB 4.15
@
text
@d3 1
a3 1
  WCSLIB 4.15 - an implementation of the FITS WCS standard.
d25 1
a25 1
  $Id: prj.h,v 4.14.1.1 2012/07/13 10:04:44 cal103 Exp cal103 $
d28 1
a28 1
* WCSLIB 4.15 - C routines that implement the spherical map projections
@


4.15.1.1
log
@WCSLIB 4.15 development branch.
@
text
@d25 1
a25 1
  $Id: prj.h,v 4.15 2012/09/26 14:26:05 cal103 Exp $
@


4.14
log
@WCSLIB 4.14
@
text
@d3 1
a3 1
  WCSLIB 4.14 - an implementation of the FITS WCS standard.
d25 1
a25 1
  $Id: prj.h,v 4.13.1.2 2012/07/13 03:34:20 cal103 Exp cal103 $
d28 1
a28 1
* WCSLIB 4.14 - C routines that implement the spherical map projections
@


4.14.1.1
log
@WCSLIB 4.14 development branch.
@
text
@d25 1
a25 1
  $Id: prj.h,v 4.14 2012/07/13 10:02:27 cal103 Exp $
@


4.13
log
@WCSLIB 4.13
@
text
@d3 1
a3 1
  WCSLIB 4.13 - an implementation of the FITS WCS standard.
d19 1
a19 1
  along with WCSLIB.  If not, see <http://www.gnu.org/licenses/>.
d21 5
a25 11
  Correspondence concerning WCSLIB may be directed to:
    Internet email: mcalabre@@atnf.csiro.au
    Postal address: Dr. Mark Calabretta
                    Australia Telescope National Facility, CSIRO
                    PO Box 76
                    Epping NSW 1710
                    AUSTRALIA

  Author: Mark Calabretta, Australia Telescope National Facility
  http://www.atnf.csiro.au/~mcalabre/index.html
  $Id: prj.h,v 4.12.1.1 2012/02/29 07:59:10 cal103 Exp cal103 $
d28 1
a28 1
* WCSLIB 4.13 - C routines that implement the spherical map projections
@


4.13.1.1
log
@WCSLIB 4.13 development branch.
@
text
@d31 1
a31 1
  $Id: prj.h,v 4.13 2012/03/14 07:39:30 cal103 Exp $
@


4.13.1.2
log
@Changed contact details.
@
text
@d19 1
a19 1
  along with WCSLIB.  If not, see http://www.gnu.org/licenses.
d21 11
a31 5
  Direct correspondence concerning WCSLIB to mark@@calabretta.id.au

  Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
  http://www.atnf.csiro.au/people/Mark.Calabretta
  $Id: prj.h,v 4.13.1.1 2012/03/14 07:40:37 cal103 Exp cal103 $
@


4.12
log
@WCSLIB 4.12
@
text
@d3 1
a3 1
  WCSLIB 4.12 - an implementation of the FITS WCS standard.
d31 1
a31 1
  $Id: prj.h,v 4.11.1.1 2012/02/20 23:31:13 cal103 Exp cal103 $
d34 1
a34 1
* WCSLIB 4.12 - C routines that implement the spherical map projections
@


4.12.1.1
log
@WCSLIB 4.12 development branch.
@
text
@d31 1
a31 1
  $Id: prj.h,v 4.12 2012/02/29 07:57:56 cal103 Exp $
@


4.11
log
@WCSLIB 4.11
@
text
@d3 1
a3 1
  WCSLIB 4.11 - an implementation of the FITS WCS standard.
d31 1
a31 1
  $Id: prj.h,v 4.10.1.1 2012/02/05 23:42:46 cal103 Exp cal103 $
d34 1
a34 1
* WCSLIB 4.11 - C routines that implement the spherical map projections
@


4.11.1.1
log
@WCSLIB 4.11 development branch.
@
text
@d31 1
a31 1
  $Id: prj.h,v 4.11 2012/02/20 23:30:02 cal103 Exp $
@


4.10
log
@WCSLIB 4.10
@
text
@d3 1
a3 1
  WCSLIB 4.10 - an implementation of the FITS WCS standard.
d31 1
a31 1
  $Id: prj.h,v 4.9.1.1 2012/01/24 05:41:45 cal103 Exp cal103 $
d34 1
a34 1
* WCSLIB 4.10 - C routines that implement the spherical map projections
@


4.10.1.1
log
@WCSLIB 4.10 development branch.
@
text
@d31 1
a31 1
  $Id: prj.h,v 4.10 2012/02/05 23:41:44 cal103 Exp $
@


4.9
log
@WCSLIB 4.9
@
text
@d3 1
a3 1
  WCSLIB 4.9 - an implementation of the FITS WCS standard.
d31 1
a31 1
  $Id: prj.h,v 4.8.1.2 2012/01/24 05:23:06 cal103 Exp cal103 $
d34 1
a34 1
* WCSLIB 4.9 - C routines that implement the spherical map projections
@


4.9.1.1
log
@WCSLIB 4.9 development branch.
@
text
@d31 1
a31 1
  $Id: prj.h,v 4.9 2012/01/24 05:40:29 cal103 Exp $
@


4.8
log
@WCSLIB 4.8
@
text
@d3 2
a4 2
  WCSLIB 4.8 - an implementation of the FITS WCS standard.
  Copyright (C) 1995-2011, Mark Calabretta
d31 1
a31 1
  $Id: prj.h,v 4.7.1.5 2011/08/15 05:54:25 cal103 Exp cal103 $
d34 1
a34 1
* WCSLIB 4.8 - C routines that implement the spherical map projections
@


4.8.1.1
log
@WCSLIB 4.8 development branch.
@
text
@d31 1
a31 1
  $Id: prj.h,v 4.8 2011/08/15 08:05:53 cal103 Exp $
@


4.8.1.2
log
@Updated date in copyright notice.
@
text
@d4 1
a4 1
  Copyright (C) 1995-2012, Mark Calabretta
d31 1
a31 1
  $Id: prj.h,v 4.8.1.1 2011/08/15 08:07:06 cal103 Exp cal103 $
@


4.7
log
@WCSLIB 4.7
@
text
@d3 1
a3 1
  WCSLIB 4.7 - an implementation of the FITS WCS standard.
d31 1
a31 1
  $Id: prj.h,v 4.6.1.3 2011/01/24 23:52:28 cal103 Exp cal103 $
d34 1
a34 1
* WCSLIB 4.7 - C routines that implement the spherical map projections
d56 2
a57 1
* values, and another, prjprt(), to print its contents.
d156 15
d173 2
a174 1
* prjprt() prints the contents of a prjprm struct.
d212 3
d229 1
d231 1
d238 1
d251 3
d269 1
d271 1
d278 1
d291 3
d310 3
d325 1
d327 1
d334 1
d347 3
d363 1
d365 1
d372 1
d385 4
d513 7
a530 3
*   int padding
*     (An unused variable inserted for alignment purposes only.)
*
d546 2
d558 10
d617 7
d637 1
@


4.7.1.1
log
@WCSLIB 4.7 development branch.
@
text
@d31 1
a31 1
  $Id: prj.h,v 4.7 2011/02/07 07:03:42 cal103 Exp $
@


4.7.1.2
log
@Added error messaging based on wcserr.  Changes supplied by Michael
Droettboom (STScI) with respect to the released WCSLIB 4.7 sources.
@
text
@a194 3
* If the return value >= 2, a detailed error message is set in the
* prj->err struct.  See wcserr.h for error handling instructions.
*                         
a227 3
* If the return value >= 2, a detailed error message is set in the
* prj->err struct.  See wcserr.h for error handling instructions.
*
a261 3
* If the return value >= 2, a detailed error message is set in the
* prj->err struct.  See wcserr.h for error handling instructions.
*                            
a277 3
* If the return value >= 2, a detailed error message is set in the
* prj->err struct.  See wcserr.h for error handling instructions.
*                         
a308 3
* If the return value >= 2, a detailed error message is set in the
* prj->err struct.  See wcserr.h for error handling instructions.
*                            
a340 4
* If the return value >= 2, a detailed error message is set in the
* prj->err struct.  See wcserr.h for error handling instructions.
*
*                            
a464 4
*   struct wcserr err
*     (Returned) When an error status is returned, this
*     structure contains detailed information about the error.
*     
a493 2
#include "wcserr.h"

a503 8
enum prj_errmsg_enum {
  PRJERR_SUCCESS      = 0, /* Success */
  PRJERR_NULL_POINTER = 1, /* Null prjprm pointer passed */
  PRJERR_BAD_PARAM    = 2, /* Invalid projection parameters */
  PRJERR_BAD_PIX      = 3, /* One or more of the (x, y) coordinates were invalid */
  PRJERR_BAD_WORLD    = 4  /* One or more of the (phi, theta) coordinates were invalid */
};
  
a552 6
  /* Error handling                                                         */
  /*------------------------------------------------------------------------*/
  struct wcserr err;
  
  /* Private                                                                */
  /*------------------------------------------------------------------------*/
a557 1

@


4.7.1.3
log
@Revised implementation of Michael Droettboom's error messaging system.
@
text
@d31 1
a31 1
  $Id: prj.h,v 4.7.1.1 2011/02/07 07:04:22 cal103 Exp cal103 $
d56 1
a56 2
* values, prjfree() reclaims any memory that may have been allocated to store
* an error message, and prjprt() prints its contents.
a154 15
* prjfree() - Destructor for the prjprm struct
* --------------------------------------------
* prjfree() frees any memory that may have been allocated to store an error
* message in the prjprm struct.
*
* Given:
*   prj       struct prjprm*
*                       Projection parameters.
*
* Function return value:
*             int       Status return value:
*                         0: Success.
*                         1: Null prjprm pointer passed.
*
*
d157 1
a157 2
* prjprt() prints the contents of a prjprm struct using wcsprintf().  Mainly
* intended for diagnostic purposes.
d195 3
a197 3
*                       For returns > 1, a detailed error message is set in
*                       prjprm::err.
*
a211 1
*
a212 1
*
a218 1
*
d231 2
a232 2
*                       For returns > 1, a detailed error message is set in
*                       prjprm::err.
a248 1
*
a249 1
*
a255 1
*
d268 3
a270 3
*                       For returns > 1, a detailed error message is set in
*                       prjprm::err.
*
d287 3
a289 3
*                       For returns > 1, a detailed error message is set in
*                       prjprm::err.
*
a301 1
*
a302 1
*
a308 1
*
d321 3
a323 3
*                       For returns > 1, a detailed error message is set in
*                       prjprm::err.
*
a336 1
*
a337 1
*
a343 1
*
d356 2
a357 3
*                       For returns > 1, a detailed error message is set in
*                       prjprm::err.
*
d359 1
d484 4
a487 4
*   struct wcserr *err
*     (Returned) When an error status is returned, this struct contains
*     detailed information about the error.
*
d499 3
d530 5
a534 7
  PRJERR_SUCCESS      = 0,	/* Success. */
  PRJERR_NULL_POINTER = 1,	/* Null prjprm pointer passed. */
  PRJERR_BAD_PARAM    = 2,	/* Invalid projection parameters. */
  PRJERR_BAD_PIX      = 3,	/* One or more of the (x, y) coordinates were
				   invalid. */
  PRJERR_BAD_WORLD    = 4	/* One or more of the (phi, theta) coordinates
				   were invalid. */
d536 1
a536 1

d588 2
a589 2
  struct wcserr *err;

d597 1
a605 1
int prjfree(struct prjprm *prj);
@


4.7.1.4
log
@Clarify that detailed error messages are only returned in wcserr if enabled.
@
text
@d31 1
a31 1
  $Id: prj.h,v 4.7.1.3 2011/08/09 02:43:50 cal103 Exp cal103 $
d213 1
a213 1
*                       prjprm::err if enabled, see wcserr_enable().
d252 1
a252 1
*                       prjprm::err if enabled, see wcserr_enable().
d292 1
a292 1
*                       prjprm::err if enabled, see wcserr_enable().
d311 1
a311 1
*                       prjprm::err if enabled, see wcserr_enable().
d348 1
a348 1
*                       prjprm::err if enabled, see wcserr_enable().
d386 1
a386 1
*                       prjprm::err if enabled, see wcserr_enable().
d514 2
a515 2
*     (Returned) If enabled, when an error status is returned this struct
*     contains detailed information about the error, see wcserr_enable().
@


4.7.1.5
log
@Added padding to the prjprm struct to cater for the Fortran wrappers in
SunOS 5.9.
@
text
@d31 1
a31 1
  $Id: prj.h,v 4.7.1.4 2011/08/10 06:52:12 cal103 Exp cal103 $
a516 3
*   void *padding
*     (An unused variable inserted for alignment purposes only.)
*
a619 1
  void   *padding;		/* (Dummy inserted for alignment purposes.) */
@


4.6
log
@WCSLIB 4.6
@
text
@d3 2
a4 2
  WCSLIB 4.6 - an implementation of the FITS WCS standard.
  Copyright (C) 1995-2010, Mark Calabretta
d31 1
a31 1
  $Id: prj.h,v 4.5.1.2 2010/11/16 00:13:14 cal103 Exp cal103 $
d34 1
a34 1
* WCSLIB 4.6 - C routines that implement the spherical map projections
d554 1
a554 2
  int    n;			/* Intermediate value.                      */
  int    padding;		/* (Dummy inserted for alignment purposes.) */
@


4.6.1.1
log
@WCSLIB 4.6 development branch.
@
text
@d31 1
a31 1
  $Id: prj.h,v 4.6 2010/11/16 06:15:31 cal103 Exp $
@


4.6.1.2
log
@Updated date in copyright notice.
@
text
@d4 1
a4 1
  Copyright (C) 1995-2011, Mark Calabretta
d31 1
a31 1
  $Id: prj.h,v 4.6.1.1 2010/11/16 06:16:19 cal103 Exp cal103 $
@


4.6.1.3
log
@Turned the padding variable into an extra int to be used as an
intermediate value (for the HPX projection).
@
text
@d31 1
a31 1
  $Id: prj.h,v 4.6.1.2 2011/01/14 06:33:16 cal103 Exp cal103 $
d554 2
a555 1
  int    m, n;			/* Intermediate values.                     */
@


4.5
log
@WCSLIB 4.5
@
text
@d3 1
a3 1
  WCSLIB 4.5 - an implementation of the FITS WCS standard.
d31 1
a31 1
  $Id: prj.h,v 4.4.1.2 2010/01/19 03:42:50 cal103 Exp cal103 $
d34 1
a34 1
* WCSLIB 4.5 - C routines that implement the spherical map projections
d531 1
a531 1
  int   flag;			/* Set to zero to force initialization.     */
d539 1
a539 1
  int   bounds;			/* Enable strict bounds checking.           */
d544 7
a550 7
  int   category;		/* Projection category.                     */
  int   pvrange;		/* Range of projection parameter indices.   */
  int   simplezen;		/* Is it a simple zenithal projection?      */
  int   equiareal;		/* Is it an equal area projection?          */
  int   conformal;		/* Is it a conformal projection?            */
  int   global;			/* Can it map the whole sphere?             */
  int   divergent;		/* Does the projection diverge in latitude? */
d554 2
a555 2
  int   n;			/* Intermediate value.                      */
  int   padding;		/* (Dummy inserted for alignment purposes.) */
@


4.5.1.1
log
@WCSLIB 4.5 development branch.
@
text
@d31 1
a31 1
  $Id: prj.h,v 4.5 2010/07/16 07:01:25 cal103 Exp $
@


4.5.1.2
log
@Indentation of members of the prjprm struct.
@
text
@d31 1
a31 1
  $Id: prj.h,v 4.5.1.1 2010/07/16 07:05:31 cal103 Exp cal103 $
d531 1
a531 1
  int    flag;			/* Set to zero to force initialization.     */
d539 1
a539 1
  int    bounds;		/* Enable strict bounds checking.           */
d544 7
a550 7
  int    category;		/* Projection category.                     */
  int    pvrange;		/* Range of projection parameter indices.   */
  int    simplezen;		/* Is it a simple zenithal projection?      */
  int    equiareal;		/* Is it an equal area projection?          */
  int    conformal;		/* Is it a conformal projection?            */
  int    global;		/* Can it map the whole sphere?             */
  int    divergent;		/* Does the projection diverge in latitude? */
d554 2
a555 2
  int    n;			/* Intermediate value.                      */
  int    padding;		/* (Dummy inserted for alignment purposes.) */
@


4.4
log
@WCSLIB 4.4
@
text
@d3 2
a4 2
  WCSLIB 4.4 - an implementation of the FITS WCS standard.
  Copyright (C) 1995-2009, Mark Calabretta
d31 1
a31 1
  $Id: prj.h,v 4.3.1.3 2009/07/22 05:10:07 cal103 Exp cal103 $
d34 1
a34 1
* WCSLIB 4.4 - C routines that implement the spherical map projections
@


4.4.1.1
log
@WCSLIB 4.4 development branch.
@
text
@d31 1
a31 1
  $Id: prj.h,v 4.4 2009/08/06 07:41:33 cal103 Exp $
@


4.4.1.2
log
@Updated date in copyright notice.
@
text
@d4 1
a4 1
  Copyright (C) 1995-2010, Mark Calabretta
d31 1
a31 1
  $Id: prj.h,v 4.4.1.1 2009/08/10 08:52:49 cal103 Exp cal103 $
@


4.3
log
@WCSLIB 4.3
@
text
@d3 2
a4 2
    WCSLIB 4.3 - an implementation of the FITS WCS standard.
    Copyright (C) 1995-2007, Mark Calabretta
d6 1
a6 1
    This file is part of WCSLIB.
d8 24
a31 24
    WCSLIB is free software: you can redistribute it and/or modify it under
    the terms of the GNU Lesser General Public License as published by the
    Free Software Foundation, either version 3 of the License, or (at your
    option) any later version.

    WCSLIB is distributed in the hope that it will be useful, but WITHOUT ANY
    WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
    FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for
    more details.

    You should have received a copy of the GNU Lesser General Public License
    along with WCSLIB.  If not, see <http://www.gnu.org/licenses/>.

    Correspondence concerning WCSLIB may be directed to:
       Internet email: mcalabre@@atnf.csiro.au
       Postal address: Dr. Mark Calabretta
                       Australia Telescope National Facility, CSIRO
                       PO Box 76
                       Epping NSW 1710
                       AUSTRALIA

    Author: Mark Calabretta, Australia Telescope National Facility
    http://www.atnf.csiro.au/~mcalabre/index.html
    $Id: prj.h,v 4.2.1.6 2007/12/03 05:02:17 cal103 Exp cal103 $
d34 2
a35 2
*   WCSLIB 4.3 - C routines that implement the spherical map projections
*   recognized by the FITS World Coordinate System (WCS) standard.  Refer to
d37 2
a38 2
*      "Representations of world coordinates in FITS",
*      Greisen, E.W., & Calabretta, M.R. 2002, A&A, 395, 1061 (Paper I)
d40 2
a41 2
*      "Representations of celestial coordinates in FITS",
*      Calabretta, M.R., & Greisen, E.W. 2002, A&A, 395, 1077 (Paper II)
d43 445
a487 379
*   Refer to the README file provided with WCSLIB for an overview of the
*   library.
*
*
*   Summary of the prj routines
*   ---------------------------
*   These routines implement the spherical map projections defined by the FITS
*   WCS standard.  They are based on the prjprm struct, described in detail
*   below, which contains all information needed for the computations.  The
*   struct contains some members that must be set by the caller, and others
*   that are maintained by these routines, somewhat like a C++ class but with
*   no encapsulation.
*
*   Routine prjini() is provided to initialize the prjprm struct with default
*   values, and another, prjprt(), to print its contents.
*
*   Setup routines for each projection with names of the form ???set(), where
*   "???" is the three-letter projection code, compute intermediate values in
*   the prjprm struct from parameters in it that were supplied by the caller.
*   The struct always needs to be set by the projection's setup routine but it
*   need not be called explicitly - see the explanation of prj.flag below.
*
*   Each map projection is implemented via separate functions for the
*   spherical projection, ???s2x(), and deprojection, ???x2s().
*
*   A set of generic driver routines, prjset(), prjx2s(), and prjs2x(),
*   provide a generic interface to the projection routines.  These these
*   invoke the specific projection routines via a pointer-to-funcation they
*   are slightly less efficient than calling the specific routines directly.
*
*   In summary, the routines are:
*
*      prjini                 Initialization routine for the prjprm struct.
*      prjprt                 Routine to print the prjprm struct.
*
*      prjset prjx2s prjs2x   Generic driver routines (see below).
*
*      azpset azpx2s azps2x   AZP: zenithal/azimuthal perspective
*      szpset szpx2s szps2x   SZP: slant zenithal perspective
*      tanset tanx2s tans2x   TAN: gnomonic
*      stgset stgx2s stgs2x   STG: stereographic
*      sinset sinx2s sins2x   SIN: orthographic/synthesis
*      arcset arcx2s arcs2x   ARC: zenithal/azimuthal equidistant
*      zpnset zpnx2s zpns2x   ZPN: zenithal/azimuthal polynomial
*      zeaset zeax2s zeas2x   ZEA: zenithal/azimuthal equal area
*      airset airx2s airs2x   AIR: Airy
*      cypset cypx2s cyps2x   CYP: cylindrical perspective
*      ceaset ceax2s ceas2x   CEA: cylindrical equal area
*      carset carx2s cars2x   CAR: Plate carree
*      merset merx2s mers2x   MER: Mercator
*      sflset sflx2s sfls2x   SFL: Sanson-Flamsteed
*      parset parx2s pars2x   PAR: parabolic
*      molset molx2s mols2x   MOL: Mollweide
*      aitset aitx2s aits2x   AIT: Hammer-Aitoff
*      copset copx2s cops2x   COP: conic perspective
*      coeset coex2s coes2x   COE: conic equal area
*      codset codx2s cods2x   COD: conic equidistant
*      cooset coox2s coos2x   COO: conic orthomorphic
*      bonset bonx2s bons2x   BON: Bonne
*      pcoset pcox2s pcos2x   PCO: polyconic
*      tscset tscx2s tscs2x   TSC: tangential spherical cube
*      cscset cscx2s cscs2x   CSC: COBE quadrilateralized spherical cube
*      qscset qscx2s qscs2x   QSC: quadrilateralized spherical cube
*      hpxset hpxx2s hpxs2x   HPX: HEALPix
*
*
*   Default constructor for the prjprm struct; prjini()
*   ---------------------------------------------------
*   prjini() sets all members of a prjprm struct to default values.  It should
*   be used to initialize every prjprm struct.
*
*   Returned:
*      prj      struct prjprm*
*                        Projection parameters (see below).
*
*   Function return value:
*               int      Status return value:
*                           0: Success.
*                           1: Null prjprm pointer passed.
*
*
*   Print routine for the prjprm struct; prjprt()
*   ---------------------------------------------
*   prjprt() prints the contents of a prjprm struct.
*
*   Given:
*      prj      const struct prjprm*
*                        Projection parameters (see below).
*
*   Function return value:
*               int      Status return value:
*                           0: Success.
*                           1: Null prjprm pointer passed.
*
*
*   Generic driver routines; prjset(), prjx2s() & prjs2x()
*   ------------------------------------------------------
*   Driver routines are available for use as a generic interface to the
*   specific projection routines.  The interfaces to these routines are the
*   same as those of the corresponding routines for the specific projections
*   (see below).
*
*   The one important distinction between these and the specific projection
*   routines is that the projection code must be defined in the prjprm struct
*   as this is needed by prjset() to identify the required projection.  Once
*   prjset() has initialized the prjprm struct, prjx2s() and prjs2x() use the
*   pointers to the specific projection and deprojection contained therein.
*
*
*   Setup routines; *set()
*   ----------------------
*   Set up a prjprm struct according to information supplied within it (see
*   "Projection parameters" below).
*
*   Note that this routine need not be called directly; it will be invoked by
*   prjx2s() and prjs2x() if the "flag" struct member is anything other than a
*   predefined magic value.
*
*   Given and/or returned:
*      prj      struct prjprm*
*                        Projection parameters (see below).
*
*   Function return value:
*               int      Status return value:
*                           0: Success.
*                           1: Null prjprm pointer passed.
*                           2: Invalid projection parameters.
*
*
*   Cartesian-to-spherical deprojection; *x2s()
*   -------------------------------------------
*   Transform (x,y) coordinates in the plane of projection to native spherical
*   coordinates (phi,theta).
*
*   Given and returned:
*      prj      struct prjprm*
*                        Projection parameters (see below).
*
*   Given:
*      nx,ny    int      Vector lengths, see below.
*      sxy,spt  int      Vector strides, see below.
*      x,y      const double[]
*                        Projected coordinates.
*
*   Returned:
*      phi,     double[] Longitude and latitude of the projected point in
*      theta             native spherical coordinates, in degrees.
*      stat     int[]    Status return value for each vector element:
*                           0: Success.
*                           1: Invalid value of (x,y).
*
*   Function return value:
*               int      Status return value:
*                           0: Success.
*                           1: Null prjprm pointer passed.
*                           2: Invalid projection parameters.
*                           3: One or more of the (x,y) coordinates were
*                              invalid, as indicated by the stat vector.
*
*
*   Spherical-to-Cartesian projection; *s2x()
*   -----------------------------------------
*   Transform native spherical coordinates (phi,theta) to (x,y) coordinates in
*   the plane of projection.
*
*   Given and returned:
*      prj      struct prjprm*
*                        Projection parameters (see below).
*
*   Given:
*      nphi,    int
*      ntheta            Vector lengths, see below.
*      spt,sxy  int      Vector strides, see below.
*      phi,     const double[]
*      theta             Longitude and latitude of the projected point in
*                        native spherical coordinates, in degrees.
*
*   Returned:
*      x,y      double[] Projected coordinates.
*      stat     int[]    Status return value for each vector element:
*                           0: Success.
*                           1: Invalid value of (phi,theta).
*
*   Function return value:
*               int      Status return value:
*                           0: Success.
*                           1: Null prjprm pointer passed.
*                           2: Invalid projection parameters.
*                           4: One or more of the (phi,theta) coordinates
*                              were, invalid, as indicated by the stat vector.
*
*   Projection parameters
*   ---------------------
*   The prjprm struct consists of the following elements that must be
*   supplied:
*
*      int flag
*         This flag must be set to zero whenever any of the following prjprm
*         structure members are set or changed: code, r0, pv[], phi0, and
*         theta0.  This signals the initialization routine to recompute
*         intermediaries.  It need not be reset when bounds is changed.
*
*      char code[4]
*         Three-letter projection code.
*
*      double r0
*         r0; The radius of the generating sphere for the projection, a linear
*         scaling parameter.  If this is zero, it will be reset to the default
*         value of 180/pi (the value for FITS WCS).
*
*      double pv[30]
*         Projection parameters.  These correspond to the PVi_ma keywords in
*         FITS, so pv[0] is PVi_0a, pv[1] is PVi_1a, etc., where i denotes the
*         latitude-like axis.  Many projections use pv[1] (PVi_1a), some also
*         use pv[2] (PVi_2a) and SZP uses pv[3] (PVi_3a).  ZPN is the only
*         projection that uses any of the others.
*
*      double phi0, theta0
*         Native longitude and latitude of the reference point, i.e. the point
*         (x,y) = (0,0).  If undefined (set to a magic value by prjini()) the
*         initialization routine will set this to a projection-specific
*         default.
*
*      int bounds
*         Controls strict bounds checking for the AZP, SZP, TAN, SIN, ZPN, and
*         COP projections; set to zero to disable checking.
*
*   The remaining members of the prjprm struct are maintained by *set() and
*   must not be modified elsewhere:
*
*      char name[40]
*      int  category, pvrange, simplezen, equiareal, conformal, global,
*           divergent
*         These items are provided for the caller's information only and are
*         not used by the projection routines:
*            - Long name of the projection.
*            - category matches the value of the relevant global variable:
*              ZENITHAL, CYLINDRICAL, PSEUDOCYLINDRICAL, CONVENTIONAL, CONIC,
*              POLYCONIC, QUADCUBE, and HEALPIX.  The category name may also
*              be identified via the prj_categories character array.
*            - Range of projection parameter indices: 100 times the first
*              allowed index plus the number of parameters, e.g. TAN is 0
*              (no parameters), SZP is 103 (1 to 3), and ZPN is 30 (0 to 29).
*            - simplezen is true if the projection is a radially-symmetric
*              zenithal projection,
*            - equiareal is true if the projection is equal area,
*            - conformal is true if the projection is conformal,
*            - global    is true if the projection can represent the whole
*                        sphere in a finite, non-overlapped mapping, and
*            - divergent is true if the projection diverges in latitude.
*
*      double x0, y0
*         Offsets used to force (x,y) = (0,0) at (phi0,theta0).
*
*      double w[10]
*      int n
*         Intermediate values derived from the projection parameters.
*
*      int (*prjx2s)()
*      int (*prjs2x)()
*         Pointers to the projection and deprojection routines.
*
*   Usage of the pv[] and w[] arrays as it applies to each projection is
*   described in the prologue to each trio of projection routines in prj.c.
*
*
*   Vector lengths
*   --------------
*   Many of the projection equations are partially or fully separable in the
*   mathematical sense, e.g. (x,y) = f(phi) * g(theta).  In vector
*   computations this property provides an opportunity for caching
*   intermediate calculations and this may result in a much greater speedup
*   than simple amortisation of the function call overhead.  Accordingly, the
*   transformation routines are matrix-oriented with input coordinate pairs
*   specified via pairs of vectors (one-dimensional C arrays).
*
*   The following diagram describes the situation for the projection routines
*   with nphi = 6, and ntheta = 3:
*
*                   phi[0]   phi[1]   phi[2]   phi[3]   phi[4]   phi[5]
*                   ------   ------   ------   ------   ------   ------
*      theta[0]  |  x,y[0]   x,y[1]   x,y[2]   x,y[3]   x,y[4]   x,y[5]
*      theta[1]  |  x,y[6]   x,y[7]   x,y[8]   x,y[9]   x,y[10]  x,y[11]
*      theta[2]  |  x,y[12]  x,y[13]  x,y[14]  x,y[15]  x,y[16]  x,y[17]
*
*   In this case the projection routine would calculate nphi * ntheta = 18
*   (x,y) coordinate pairs.  It is the responsibility of the caller to ensure
*   that sufficient space has been allocated in the x[], y[] and stat[]
*   arrays.
*
*   Vector computation will often be required where neither phi nor theta is
*   constant.  This is accomplished by setting ntheta = 0 which is interpreted
*   to mean ntheta = nphi but only the matrix diagonal is to be computed.
*   Thus, for nphi = 3 and ntheta = 0 only three (x,y) coordinate pairs are
*   computed:
*
*                   phi[0]   phi[1]   phi[2]
*                   ------   ------   ------
*      theta[0]  |  x,y[0]
*      theta[1]  |           x,y[1]
*      theta[2]  |                    x,y[2]
*
*   Note how this differs from nphi = 3, ntheta = 1:
*
*                   phi[0]   phi[1]   phi[2]
*                   ------   ------   ------
*      theta[0]  |  x,y[0]   x,y[1]   x,y[2]
*
*   The situation for the deprojection routines is similar; the x-coordinate
*   (like phi) varies fastest.
*
*
*   Vector strides
*   --------------
*   The vector stride arguments allow the caller to specify that successive
*   elements of a vector are not contiguous in memory.  This applies equally
*   to vectors given to, or returned from a function.  As a simple example
*   consider the following two arrangements in memory of the elements of four
*   (x,y) coordinate pairs together with an unrelated z coordinate element:
*
*      1) x1 x2 x3 x4 y1 y2 y3 y4 z1 z2 z3 z4
*
*      2) x1 y1 z1 x2 y2 z2 x3 y3 z3 x4 y4 z4
*
*   In (1), the address of x[] is x1, its stride is 1, and length 4.
*           the address of y[] is y1, its stride is 1, and length 4.
*
*   In (2), the address of x[] is x1, its stride is 3, and length 4.
*           the address of y[] is y1, its stride is 3, and length 4.
*
*   The phi[] and theta[] arrays are assumed to have the same vector stride,
*   spt, as are the x[] and y[] arrays, sxy.
*
*   If the vector length is 1 then the stride is ignored and may be set to 0.
*
*
*   Argument checking
*   -----------------
*   Projection routines:
*
*      The values of phi and theta (the native longitude and latitude)
*      normally lie in the range [-180,180] for phi, and [-90,90] for theta.
*      However, all projection routines will accept any value of phi and will
*      not normalize it.
*
*      The projection routines do not explicitly check that theta lies within
*      the range [-90,90].  They do check for any value of theta that produces
*      an invalid argument to the projection equations (e.g. leading to
*      division by zero).  The projection routines for AZP, SZP, TAN, SIN,
*      ZPN, and COP also return error 2 if (phi,theta) corresponds to the
*      overlapped (far) side of the projection but also return the
*      corresponding value of (x,y).  This strict bounds checking may be
*      relaxed at any time by setting prj.bounds to 0 (rather than 1); the
*      projections need not be reinitialized.
*
*   Deprojection routines:
*
*      Error checking on the projected coordinates (x,y) is limited to that
*      required to ascertain whether a solution exists.  Where a solution does
*      exist no check is made that the value of phi and theta obtained lie
*      within the ranges [-180,180] for phi, and [-90,90] for theta.
*
*
*   Status return values
*   --------------------
*   Error messages to match the status value returned from each function are
*   encoded in the prj_errmsg character array.
*
*
*   Accuracy
*   --------
*   No warranty is given for the accuracy of these routines (refer to the
*   copyright notice above); intending users must satisfy for themselves their
*   adequacy for the intended purpose.  However, closure to a precision of at
*   least 1E-10 degree of longitude and latitude has been verified for typical
*   projection parameters on the 1 degree graticule of native longitude and
*   latitude (to within 5 degrees of any latitude where the projection may
*   diverge).  Refer to the tprj1.c and tprj2.c test routines that accompany
*   this software.
a502 5
#define prjini_errmsg prj_errmsg
#define prjprt_errmsg prj_errmsg
#define prjset_errmsg prj_errmsg
#define prjx2s_errmsg prj_errmsg
#define prjs2x_errmsg prj_errmsg
d511 3
d515 2
a516 3
/* Use the preprocessor to define function interfaces. */
#ifdef PRJINI
#undef PRJINI
d519 125
a643 3
#ifdef PRJPRT
#undef PRJPRT
#endif
d645 3
a647 3
#ifdef PRJSET
#undef PRJSET
#endif
d649 3
a651 3
#ifdef PRJX2S
#undef PRJX2S
#endif
d653 3
a655 3
#ifdef PRJS2X
#undef PRJS2X
#endif
d657 3
a659 9
#define PRJINI struct prjprm *
#define PRJPRT const struct prjprm *
#define PRJSET struct prjprm *
#define PRJX2S struct prjprm *, int, int, int, int, \
               const double[], const double[],      \
               double[], double[], int[]
#define PRJS2X struct prjprm *, int, int, int, int, \
               const double[], const double[],      \
               double[], double[], int[]
d661 3
d665 3
a667 28
struct prjprm {
   /* Initialization flag (see the prologue above).                         */
   /*-----------------------------------------------------------------------*/
   int    flag;			/* Set to zero to force initialization.     */

   /* Parameters to be provided (see the prologue above).                   */
   /*-----------------------------------------------------------------------*/
   char   code[4];		/* Three-letter projection code.            */
   double r0;			/* Radius of the generating sphere.         */
   double pv[PVN];		/* Projection parameters.                   */
   double phi0, theta0;		/* Fiducial native coordinates.             */
   int    bounds;		/* Enable strict bounds checking.           */

   /* Information derived from the parameters supplied.                     */
   /*-----------------------------------------------------------------------*/
   char   name[40];		/* Projection name.                         */
   int    category;		/* Projection category.                     */
   int    pvrange;		/* Range of projection parameter indices.   */
   int    simplezen;		/* Is it a simple zenithal projection?      */
   int    equiareal;		/* Is it an equal area projection?          */
   int    conformal;		/* Is it a conformal projection?            */
   int    global;		/* Can it map the whole sphere?             */
   int    divergent;		/* Does the projection diverge in latitude? */
   double x0, y0;		/* Fiducial offsets.                        */

   double w[10];		/* Intermediate values.                     */
   int    n;			/* Intermediate value.                      */
   int    padding;		/* (Dummy inserted for alignment purposes.) */
d669 3
a671 3
   int (*prjx2s)(PRJX2S);	/* Pointers to the spherical projection and */
   int (*prjs2x)(PRJS2X);	/* deprojection functions.                  */
};
d673 3
a675 1
#define PRJLEN (sizeof(struct prjprm)/sizeof(int))
d677 3
a680 37
/* Use the preprocessor to declare function prototypes (see above). */
int prjini(PRJINI);
int prjprt(PRJPRT);

#define PROTO(CODE)    \
   int CODE##set(PRJSET); \
   int CODE##x2s(PRJX2S); \
   int CODE##s2x(PRJS2X);

PROTO(prj)
PROTO(azp)
PROTO(szp)
PROTO(tan)
PROTO(stg)
PROTO(sin)
PROTO(arc)
PROTO(zpn)
PROTO(zea)
PROTO(air)
PROTO(cyp)
PROTO(cea)
PROTO(car)
PROTO(mer)
PROTO(sfl)
PROTO(par)
PROTO(mol)
PROTO(ait)
PROTO(cop)
PROTO(coe)
PROTO(cod)
PROTO(coo)
PROTO(bon)
PROTO(pco)
PROTO(tsc)
PROTO(csc)
PROTO(qsc)
PROTO(hpx)
d682 6
@


4.3.1.1
log
@WCSLIB 4.3 development branch.
@
text
@d3 2
a4 2
    WCSLIB 4.4 - an implementation of the FITS WCS standard.
    Copyright (C) 1995-2008, Mark Calabretta
d31 1
a31 1
    $Id: prj.h,v 4.3 2007/12/27 05:41:36 cal103 Exp cal103 $
d34 1
a34 1
*   WCSLIB 4.4 - C routines that implement the spherical map projections
@


4.3.1.2
log
@Replaced references to text "above" or "below" with "(see ... above|below)"
so that they can be parsed out of the doxygen markup.
@
text
@d31 1
a31 1
    $Id: prj.h,v 4.3.1.1 2007/12/27 13:23:47 cal103 Exp cal103 $
d50 5
a54 5
*   WCS standard.  They are based on the prjprm struct (see below) which
*   contains all information needed for the computations.  The struct contains
*   some members that must be set by the caller, and others that are
*   maintained by these routines, somewhat like a C++ class but with no
*   encapsulation.
d63 1
a63 2
*   need not be called explicitly - refer to the explanation of prj.flag (see
*   below).
d182 2
a183 2
*      nx,ny    int      Vector lengths (see below).
*      sxy,spt  int      Vector strides (see below).
d214 2
a215 2
*      ntheta            Vector lengths (see below).
*      spt,sxy  int      Vector strides (see below).
d415 1
a415 1
*   copyright notice); intending users must satisfy for themselves their
@


4.3.1.3
log
@Changes required for generation of the manual using doxextr and doxygen,
including naming of arguments in function prototypes.
@
text
@d3 2
a4 2
  WCSLIB 4.4 - an implementation of the FITS WCS standard.
  Copyright (C) 1995-2009, Mark Calabretta
d6 1
a6 1
  This file is part of WCSLIB.
d8 24
a31 24
  WCSLIB is free software: you can redistribute it and/or modify it under the
  terms of the GNU Lesser General Public License as published by the Free
  Software Foundation, either version 3 of the License, or (at your option)
  any later version.

  WCSLIB is distributed in the hope that it will be useful, but WITHOUT ANY
  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for
  more details.

  You should have received a copy of the GNU Lesser General Public License
  along with WCSLIB.  If not, see <http://www.gnu.org/licenses/>.

  Correspondence concerning WCSLIB may be directed to:
    Internet email: mcalabre@@atnf.csiro.au
    Postal address: Dr. Mark Calabretta
                    Australia Telescope National Facility, CSIRO
                    PO Box 76
                    Epping NSW 1710
                    AUSTRALIA

  Author: Mark Calabretta, Australia Telescope National Facility
  http://www.atnf.csiro.au/~mcalabre/index.html
  $Id: prj.h,v 4.3.1.2 2008/04/02 06:17:13 cal103 Exp cal103 $
d34 2
a35 2
* WCSLIB 4.4 - C routines that implement the spherical map projections
* recognized by the FITS World Coordinate System (WCS) standard.  Refer to
d37 2
a38 2
*   "Representations of world coordinates in FITS",
*   Greisen, E.W., & Calabretta, M.R. 2002, A&A, 395, 1061 (Paper I)
d40 2
a41 2
*   "Representations of celestial coordinates in FITS",
*   Calabretta, M.R., & Greisen, E.W. 2002, A&A, 395, 1077 (Paper II)
d43 380
a422 445
* Refer to the README file provided with WCSLIB for an overview of the
* library.
*
*
* Summary of the prj routines
* ---------------------------
* These routines implement the spherical map projections defined by the FITS
* WCS standard.  They are based on the prjprm struct which contains all
* information needed for the computations.  The struct contains some members
* that must be set by the user, and others that are maintained by these
* routines, somewhat like a C++ class but with no encapsulation.
*
* Routine prjini() is provided to initialize the prjprm struct with default
* values, and another, prjprt(), to print its contents.
*
* Setup routines for each projection with names of the form ???set(), where
* "???" is the down-cased three-letter projection code, compute intermediate
* values in the prjprm struct from parameters in it that were supplied by the
* user.  The struct always needs to be set by the projection's setup routine
* but that need not be called explicitly - refer to the explanation of
* prjprm::flag.
*
* Each map projection is implemented via separate functions for the spherical
* projection, ???s2x(), and deprojection, ???x2s().
*
* A set of driver routines, prjset(), prjx2s(), and prjs2x(), provides a
* generic interface to the specific projection routines which they invoke
* via pointers-to-functions stored in the prjprm struct.
*
* In summary, the routines are:
*   - prjini()                Initialization routine for the prjprm struct.
*   - prjprt()                Routine to print the prjprm struct.
*
*   - prjset(), prjx2s(), prjs2x():   Generic driver routines
*
*   - azpset(), azpx2s(), azps2x():   AZP (zenithal/azimuthal perspective)
*   - szpset(), szpx2s(), szps2x():   SZP (slant zenithal perspective)
*   - tanset(), tanx2s(), tans2x():   TAN (gnomonic)
*   - stgset(), stgx2s(), stgs2x():   STG (stereographic)
*   - sinset(), sinx2s(), sins2x():   SIN (orthographic/synthesis)
*   - arcset(), arcx2s(), arcs2x():   ARC (zenithal/azimuthal equidistant)
*   - zpnset(), zpnx2s(), zpns2x():   ZPN (zenithal/azimuthal polynomial)
*   - zeaset(), zeax2s(), zeas2x():   ZEA (zenithal/azimuthal equal area)
*   - airset(), airx2s(), airs2x():   AIR (Airy)
*   - cypset(), cypx2s(), cyps2x():   CYP (cylindrical perspective)
*   - ceaset(), ceax2s(), ceas2x():   CEA (cylindrical equal area)
*   - carset(), carx2s(), cars2x():   CAR (Plate carree)
*   - merset(), merx2s(), mers2x():   MER (Mercator)
*   - sflset(), sflx2s(), sfls2x():   SFL (Sanson-Flamsteed)
*   - parset(), parx2s(), pars2x():   PAR (parabolic)
*   - molset(), molx2s(), mols2x():   MOL (Mollweide)
*   - aitset(), aitx2s(), aits2x():   AIT (Hammer-Aitoff)
*   - copset(), copx2s(), cops2x():   COP (conic perspective)
*   - coeset(), coex2s(), coes2x():   COE (conic equal area)
*   - codset(), codx2s(), cods2x():   COD (conic equidistant)
*   - cooset(), coox2s(), coos2x():   COO (conic orthomorphic)
*   - bonset(), bonx2s(), bons2x():   BON (Bonne)
*   - pcoset(), pcox2s(), pcos2x():   PCO (polyconic)
*   - tscset(), tscx2s(), tscs2x():   TSC (tangential spherical cube)
*   - cscset(), cscx2s(), cscs2x():   CSC (COBE spherical cube)
*   - qscset(), qscx2s(), qscs2x():   QSC (quadrilateralized spherical cube)
*   - hpxset(), hpxx2s(), hpxs2x():   HPX (HEALPix)
*
* Argument checking (projection routines):
* ----------------------------------------
* The values of phi and theta (the native longitude and latitude) normally lie
* in the range [-180,180] for phi, and [-90,90] for theta.  However, all
* projection routines will accept any value of phi and will not normalize it.
*
* The projection routines do not explicitly check that theta lies within the
* range [-90,90].  They do check for any value of theta that produces an
* invalid argument to the projection equations (e.g. leading to division by
* zero).  The projection routines for AZP, SZP, TAN, SIN, ZPN, and COP also
* return error 2 if (phi,theta) corresponds to the overlapped (far) side of
* the projection but also return the corresponding value of (x,y).  This
* strict bounds checking may be relaxed at any time by setting prjprm::bounds
* to 0 (rather than 1); the projections need not be reinitialized.
*
* Argument checking (deprojection routines):
* ------------------------------------------
* Error checking on the projected coordinates (x,y) is limited to that
* required to ascertain whether a solution exists.  Where a solution does
* exist no check is made that the value of phi and theta obtained lie within
* the ranges [-180,180] for phi, and [-90,90] for theta.
*
* Accuracy:
* ---------
* No warranty is given for the accuracy of these routines (refer to the
* copyright notice); intending users must satisfy for themselves their
* adequacy for the intended purpose.  However, closure to a precision of at
* least 1E-10 degree of longitude and latitude has been verified for typical
* projection parameters on the 1 degree graticule of native longitude and
* latitude (to within 5 degrees of any latitude where the projection may
* diverge).  Refer to the tprj1.c and tprj2.c test routines that accompany
* this software.
*
*
* prjini() - Default constructor for the prjprm struct
* ----------------------------------------------------
* prjini() sets all members of a prjprm struct to default values.  It should
* be used to initialize every prjprm struct.
*
* Returned:
*   prj       struct prjprm*
*                       Projection parameters.
*
* Function return value:
*             int       Status return value:
*                         0: Success.
*                         1: Null prjprm pointer passed.
*
*
* prjprt() - Print routine for the prjprm struct
* ----------------------------------------------
* prjprt() prints the contents of a prjprm struct.
*
* Given:
*   prj       const struct prjprm*
*                       Projection parameters.
*
* Function return value:
*             int       Status return value:
*                         0: Success.
*                         1: Null prjprm pointer passed.
*
*
* prjset() - Generic setup routine for the prjprm struct
* ------------------------------------------------------
* prjset() sets up a prjprm struct according to information supplied within
* it.
*
* Note that this routine need not be called directly; it will be invoked by
* prjx2s() and prjs2x() if prj.flag is anything other than a predefined magic
* value.
*
* The one important distinction between prjset() and the setup routines for
* the specific projections is that the projection code must be defined in the
* prjprm struct in order for prjset() to identify the required projection.
* Once prjset() has initialized the prjprm struct, prjx2s() and prjs2x() use
* the pointers to the specific projection and deprojection routines contained
* therein.
*
* Given and returned:
*   prj       struct prjprm*
*                       Projection parameters.
*
* Function return value:
*             int       Status return value:
*                         0: Success.
*                         1: Null prjprm pointer passed.
*                         2: Invalid projection parameters.
*
*
* prjx2s() - Generic Cartesian-to-spherical deprojection
* ------------------------------------------------------
* Deproject Cartesian (x,y) coordinates in the plane of projection to native
* spherical coordinates (phi,theta).
*
* The projection is that specified by prjprm::code.
*
* Given and returned:
*   prj       struct prjprm*
*                       Projection parameters.
*
* Given:
*   nx,ny     int       Vector lengths.
*   sxy,spt   int       Vector strides.
*   x,y       const double[]
*                       Projected coordinates.
*
* Returned:
*   phi,theta double[]  Longitude and latitude (phi,theta) of the projected
*                       point in native spherical coordinates [deg].
*   stat      int[]     Status return value for each vector element:
*                         0: Success.
*                         1: Invalid value of (x,y).
*
* Function return value:
*             int       Status return value:
*                         0: Success.
*                         1: Null prjprm pointer passed.
*                         2: Invalid projection parameters.
*                         3: One or more of the (x,y) coordinates were
*                            invalid, as indicated by the stat vector.
*
*
* prjs2x() - Generic spherical-to-Cartesian projection
* ----------------------------------------------------
* Project native spherical coordinates (phi,theta) to Cartesian (x,y)
* coordinates in the plane of projection.
*
* The projection is that specified by prjprm::code.
*
* Given and returned:
*   prj       struct prjprm*
*                       Projection parameters.
*
* Given:
*   nphi,
*   ntheta    int       Vector lengths.
*   spt,sxy   int       Vector strides.
*   phi,theta const double[]
*                       Longitude and latitude (phi,theta) of the projected
*                       point in native spherical coordinates [deg].
*
* Returned:
*   x,y       double[]  Projected coordinates.
*   stat      int[]     Status return value for each vector element:
*                         0: Success.
*                         1: Invalid value of (phi,theta).
*
* Function return value:
*             int       Status return value:
*                         0: Success.
*                         1: Null prjprm pointer passed.
*                         2: Invalid projection parameters.
*                         4: One or more of the (phi,theta) coordinates
*                            were, invalid, as indicated by the stat vector.
*
*
* ???set() - Specific setup routines for the prjprm struct
* --------------------------------------------------------
* Set up a prjprm struct for a particular projection according to information
* supplied within it.
*
* Given and returned:
*   prj       struct prjprm*
*                       Projection parameters.
*
* Function return value:
*             int       Status return value:
*                         0: Success.
*                         1: Null prjprm pointer passed.
*                         2: Invalid projection parameters.
*
*
* ???x2s() - Specific Cartesian-to-spherical deprojection routines
* ----------------------------------------------------------------
* Transform (x,y) coordinates in the plane of projection to native spherical
* coordinates (phi,theta).
*
* Given and returned:
*   prj       struct prjprm*
*                       Projection parameters.
*
* Given:
*   nx,ny     int       Vector lengths.
*   sxy,spt   int       Vector strides.
*   x,y       const double[]
*                       Projected coordinates.
*
* Returned:
*   phi,theta double[]  Longitude and latitude of the projected point in
*                       native spherical coordinates [deg].
*   stat      int[]     Status return value for each vector element:
*                         0: Success.
*                         1: Invalid value of (x,y).
*
* Function return value:
*             int       Status return value:
*                         0: Success.
*                         1: Null prjprm pointer passed.
*                         2: Invalid projection parameters.
*                         3: One or more of the (x,y) coordinates were
*                            invalid, as indicated by the stat vector.
*
*
* ???s2x() - Specific spherical-to-Cartesian projection routines
*---------------------------------------------------------------
* Transform native spherical coordinates (phi,theta) to (x,y) coordinates in
* the plane of projection.
*
* Given and returned:
*   prj       struct prjprm*
*                       Projection parameters.
*
* Given:
*   nphi,
*   ntheta    int       Vector lengths.
*   spt,sxy   int       Vector strides.
*   phi,theta const double[]
*                       Longitude and latitude of the projected point in
*                       native spherical coordinates [deg].
*
* Returned:
*   x,y       double[]  Projected coordinates.
*   stat      int[]     Status return value for each vector element:
*                         0: Success.
*                         1: Invalid value of (phi,theta).
*
* Function return value:
*             int       Status return value:
*                         0: Success.
*                         1: Null prjprm pointer passed.
*                         2: Invalid projection parameters.
*                         4: One or more of the (phi,theta) coordinates
*                            were, invalid, as indicated by the stat vector.
*
* prjprm struct - Projection parameters
* -------------------------------------
* The prjprm struct contains all information needed to project or deproject
* native spherical coordinates.  It consists of certain members that must be
* set by the user ("given") and others that are set by the WCSLIB routines
* ("returned").  Some of the latter are supplied for informational purposes
* while others are for internal use only.
*
*   int flag
*     (Given and returned) This flag must be set to zero whenever any of the
*     following prjprm struct members are set or changed:
*
*       - prjprm::code,
*       - prjprm::r0,
*       - prjprm::pv[],
*       - prjprm::phi0,
*       - prjprm::theta0.
*
*     This signals the initialization routine (prjset() or ???set()) to
*     recompute the returned members of the prjprm struct.  flag will then be
*     reset to indicate that this has been done.
*
*     Note that flag need not be reset when prjprm::bounds is changed.
*
*   char code[4]
*     (Given) Three-letter projection code defined by the FITS standard.
*
*   double r0
*     (Given) The radius of the generating sphere for the projection, a linear
*     scaling parameter.  If this is zero, it will be reset to its default
*     value of 180/pi (the value for FITS WCS).
*
*   double pv[30]
*     (Given) Projection parameters.  These correspond to the PVi_ma keywords
*     in FITS, so pv[0] is PVi_0a, pv[1] is PVi_1a, etc., where i denotes the
*     latitude-like axis.  Many projections use pv[1] (PVi_1a), some also use
*     pv[2] (PVi_2a) and SZP uses pv[3] (PVi_3a).  ZPN is currently the only
*     projection that uses any of the others.
*
*     Usage of the pv[] array as it applies to each projection is described in
*     the prologue to each trio of projection routines in prj.c.
*
*   double phi0
*     (Given) The native longitude, phi_0 [deg], and ...
*   double theta0
*     (Given) ... the native latitude, theta_0 [deg], of the reference point,
*     i.e. the point (x,y) = (0,0).  If undefined (set to a magic value by
*     prjini()) the initialization routine will set this to a
*     projection-specific default.
*
*   int bounds
*     (Given) Controls strict bounds checking for the AZP, SZP, TAN, SIN, ZPN,
*     and COP projections; set to zero to disable checking.
*
* The remaining members of the prjprm struct are maintained by the setup
* routines and must not be modified elsewhere:
*
*   char name[40]
*     (Returned) Long name of the projection.
*
*     Provided for information only, not used by the projection routines.
*
*   int  category
*     (Returned) Projection category matching the value of the relevant global
*     variable:
*
*     - ZENITHAL,
*     - CYLINDRICAL,
*     - PSEUDOCYLINDRICAL,
*     - CONVENTIONAL,
*     - CONIC,
*     - POLYCONIC,
*     - QUADCUBE, and
*     - HEALPIX.
*
*     The category name may be identified via the prj_categories character
*     array, e.g.
*
=       struct prjprm prj;
=         ...
=       printf("%s\n", prj_categories[prj.category]);
*
*     Provided for information only, not used by the projection routines.
*
*   int  pvrange
*     (Returned) Range of projection parameter indices: 100 times the first
*     allowed index plus the number of parameters, e.g. TAN is 0 (no
*     parameters), SZP is 103 (1 to 3), and ZPN is 30 (0 to 29).
*
*     Provided for information only, not used by the projection routines.
*
*   int  simplezen
*     (Returned) True if the projection is a radially-symmetric zenithal
*     projection.
*
*     Provided for information only, not used by the projection routines.
*
*   int  equiareal
*     (Returned) True if the projection is equal area.
*
*     Provided for information only, not used by the projection routines.
*
*   int  conformal
*     (Returned) True if the projection is conformal.
*
*     Provided for information only, not used by the projection routines.
*
*   int  global
*     (Returned) True if the projection can represent the whole sphere in a
*     finite, non-overlapped mapping.
*
*     Provided for information only, not used by the projection routines.
*
*   int  divergent
*     (Returned) True if the projection diverges in latitude.
*
*     Provided for information only, not used by the projection routines.
*
*   double x0
*     (Returned) The offset in x, and ...
*   double y0
*     (Returned) ... the offset in y used to force (x,y) = (0,0) at
*     (phi_0,theta_0).
*
*   double w[10]
*     (Returned) Intermediate floating-point values derived from the
*     projection parameters, cached here to save recomputation.
*
*     Usage of the w[] array as it applies to each projection is described in
*     the prologue to each trio of projection routines in prj.c.
*
*   int n
*     (Returned) Intermediate integer value (used only for the ZPN and HPX
*     projections).
*
*   int padding
*     (An unused variable inserted for alignment purposes only.)
*
*   int (*prjx2s)(PRJX2S_ARGS)
*     (Returned) Pointer to the projection ...
*   int (*prjs2x)(PRJ_ARGS)
*     (Returned) ... and deprojection routines.
*
*
* Global variable: const char *prj_errmsg[] - Status return messages
* ------------------------------------------------------------------
* Error messages to match the status value returned from each function.
d438 5
d451 16
a466 2
#ifdef PRJX2S_ARGS
#undef PRJX2S_ARGS
d469 2
a470 2
#ifdef PRJS2X_ARGS
#undef PRJS2X_ARGS
d473 9
a481 7
/* For use in declaring deprojection function prototypes. */
#define PRJX2S_ARGS struct prjprm *prj, int nx, int ny, int sxy, int spt, \
const double x[], const double y[], double phi[], double theta[], int stat[]

/* For use in declaring projection function prototypes. */
#define PRJS2X_ARGS struct prjprm *prj, int nx, int ny, int sxy, int spt, \
const double phi[], const double theta[], double x[], double y[], int stat[]
d485 27
a511 27
  /* Initialization flag (see the prologue above).                          */
  /*------------------------------------------------------------------------*/
  int   flag;			/* Set to zero to force initialization.     */

  /* Parameters to be provided (see the prologue above).                    */
  /*------------------------------------------------------------------------*/
  char   code[4];		/* Three-letter projection code.            */
  double r0;			/* Radius of the generating sphere.         */
  double pv[PVN];		/* Projection parameters.                   */
  double phi0, theta0;		/* Fiducial native coordinates.             */
  int   bounds;			/* Enable strict bounds checking.           */

  /* Information derived from the parameters supplied.                      */
  /*------------------------------------------------------------------------*/
  char   name[40];		/* Projection name.                         */
  int   category;		/* Projection category.                     */
  int   pvrange;		/* Range of projection parameter indices.   */
  int   simplezen;		/* Is it a simple zenithal projection?      */
  int   equiareal;		/* Is it an equal area projection?          */
  int   conformal;		/* Is it a conformal projection?            */
  int   global;			/* Can it map the whole sphere?             */
  int   divergent;		/* Does the projection diverge in latitude? */
  double x0, y0;		/* Fiducial offsets.                        */

  double w[10];			/* Intermediate values.                     */
  int   n;			/* Intermediate value.                      */
  int   padding;		/* (Dummy inserted for alignment purposes.) */
d513 2
a514 2
  int (*prjx2s)(PRJX2S_ARGS);	/* Pointers to the spherical projection and */
  int (*prjs2x)(PRJS2X_ARGS);	/* deprojection functions.                  */
a516 1
/* Size of the prjprm struct in int units, used by the Fortran wrappers. */
d520 37
a556 47
/* Use the preprocessor to help declare function prototypes (see above). */
int prjini(struct prjprm *prj);
int prjprt(const struct prjprm *prj);

int prjset(struct prjprm *prj);
int prjx2s(PRJX2S_ARGS);
int prjs2x(PRJS2X_ARGS);

int azpset(struct prjprm *prj);
int azpx2s(PRJX2S_ARGS);
int azps2x(PRJS2X_ARGS);

int szpset(struct prjprm *prj);
int szpx2s(PRJX2S_ARGS);
int szps2x(PRJS2X_ARGS);

int tanset(struct prjprm *prj);
int tanx2s(PRJX2S_ARGS);
int tans2x(PRJS2X_ARGS);

int stgset(struct prjprm *prj);
int stgx2s(PRJX2S_ARGS);
int stgs2x(PRJS2X_ARGS);

int sinset(struct prjprm *prj);
int sinx2s(PRJX2S_ARGS);
int sins2x(PRJS2X_ARGS);

int arcset(struct prjprm *prj);
int arcx2s(PRJX2S_ARGS);
int arcs2x(PRJS2X_ARGS);

int zpnset(struct prjprm *prj);
int zpnx2s(PRJX2S_ARGS);
int zpns2x(PRJS2X_ARGS);

int zeaset(struct prjprm *prj);
int zeax2s(PRJX2S_ARGS);
int zeas2x(PRJS2X_ARGS);

int airset(struct prjprm *prj);
int airx2s(PRJX2S_ARGS);
int airs2x(PRJS2X_ARGS);

int cypset(struct prjprm *prj);
int cypx2s(PRJX2S_ARGS);
int cyps2x(PRJS2X_ARGS);
a557 75
int ceaset(struct prjprm *prj);
int ceax2s(PRJX2S_ARGS);
int ceas2x(PRJS2X_ARGS);

int carset(struct prjprm *prj);
int carx2s(PRJX2S_ARGS);
int cars2x(PRJS2X_ARGS);

int merset(struct prjprm *prj);
int merx2s(PRJX2S_ARGS);
int mers2x(PRJS2X_ARGS);

int sflset(struct prjprm *prj);
int sflx2s(PRJX2S_ARGS);
int sfls2x(PRJS2X_ARGS);

int parset(struct prjprm *prj);
int parx2s(PRJX2S_ARGS);
int pars2x(PRJS2X_ARGS);

int molset(struct prjprm *prj);
int molx2s(PRJX2S_ARGS);
int mols2x(PRJS2X_ARGS);

int aitset(struct prjprm *prj);
int aitx2s(PRJX2S_ARGS);
int aits2x(PRJS2X_ARGS);

int copset(struct prjprm *prj);
int copx2s(PRJX2S_ARGS);
int cops2x(PRJS2X_ARGS);

int coeset(struct prjprm *prj);
int coex2s(PRJX2S_ARGS);
int coes2x(PRJS2X_ARGS);

int codset(struct prjprm *prj);
int codx2s(PRJX2S_ARGS);
int cods2x(PRJS2X_ARGS);

int cooset(struct prjprm *prj);
int coox2s(PRJX2S_ARGS);
int coos2x(PRJS2X_ARGS);

int bonset(struct prjprm *prj);
int bonx2s(PRJX2S_ARGS);
int bons2x(PRJS2X_ARGS);

int pcoset(struct prjprm *prj);
int pcox2s(PRJX2S_ARGS);
int pcos2x(PRJS2X_ARGS);

int tscset(struct prjprm *prj);
int tscx2s(PRJX2S_ARGS);
int tscs2x(PRJS2X_ARGS);

int cscset(struct prjprm *prj);
int cscx2s(PRJX2S_ARGS);
int cscs2x(PRJS2X_ARGS);

int qscset(struct prjprm *prj);
int qscx2s(PRJX2S_ARGS);
int qscs2x(PRJS2X_ARGS);

int hpxset(struct prjprm *prj);
int hpxx2s(PRJX2S_ARGS);
int hpxs2x(PRJS2X_ARGS);


/* Deprecated. */
#define prjini_errmsg prj_errmsg
#define prjprt_errmsg prj_errmsg
#define prjset_errmsg prj_errmsg
#define prjx2s_errmsg prj_errmsg
#define prjs2x_errmsg prj_errmsg
@


4.2
log
@WCSLIB 4.2
@
text
@d2 30
a31 29
*
*   WCSLIB 4.2 - an implementation of the FITS WCS standard.
*   Copyright (C) 1995-2005, Mark Calabretta
*
*   WCSLIB is free software; you can redistribute it and/or modify it under
*   the terms of the GNU General Public License as published by the Free
*   Software Foundation; either version 2 of the License, or (at your option)
*   any later version.
*
*   WCSLIB is distributed in the hope that it will be useful, but WITHOUT ANY
*   WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
*   FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
*   details.
*
*   You should have received a copy of the GNU General Public License along
*   with WCSLIB; if not, write to the Free Software Foundation, Inc.,
*   59 Temple Place, Suite 330, Boston, MA  02111-1307, USA
*
*   Correspondence concerning WCSLIB may be directed to:
*      Internet email: mcalabre@@atnf.csiro.au
*      Postal address: Dr. Mark Calabretta
*                      Australia Telescope National Facility, CSIRO
*                      PO Box 76
*                      Epping NSW 1710
*                      AUSTRALIA
*
*   Author: Mark Calabretta, Australia Telescope National Facility
*   http://www.atnf.csiro.au/~mcalabre/index.html
*   $Id: prj.h,v 4.1 2005/08/25 07:48:36 cal103 Exp cal103 $
d34 1
a34 1
*   WCSLIB 4.2 - C routines that implement the spherical map projections
d38 1
a38 1
*      Greisen, E.W., & Calabretta, M.R. 2002, A&A, 395, 1061 (paper I)
d41 1
a41 1
*      Calabretta, M.R., & Greisen, E.W. 2002, A&A, 395, 1077 (paper II)
d43 2
d46 3
a48 2
*   Summary of routines
*   -------------------
d510 1
a513 3

   double *p;			/* Aliased to pv[] by prjini() for backward */
                                /* compatibility with WCSLIB 2.x.           */
d519 1
a519 1
/* Use the preprocessor to declare function prototypes. */
a557 146
/* Define macros for scalar invokation for compatibility with WCSLIB 2.x. */
#define prjfwd_errmsg prj_errmsg
#define prjrev_errmsg prj_errmsg

extern int prj_stat;
#define prjrev(x, y, prj, phi, theta) \
        prjx2s(prj, 1, 1, 1, 1, &(x), &(y), phi, theta, &prj_stat)
#define prjfwd(phi, theta, prj, x, y) \
        prjs2x(prj, 1, 1, 1, 1, &(phi), &(theta), x, y, &prj_stat)

#define azprev(x, y, prj, phi, theta) \
        azpx2s(prj, 1, 1, 1, 1, &(x), &(y), phi, theta, &prj_stat)
#define azpfwd(phi, theta, prj, x, y) \
        azps2x(prj, 1, 1, 1, 1, &(phi), &(theta), x, y, &prj_stat)

#define szprev(x, y, prj, phi, theta) \
        szpx2s(prj, 1, 1, 1, 1, &(x), &(y), phi, theta, &prj_stat)
#define szpfwd(phi, theta, prj, x, y) \
        szps2x(prj, 1, 1, 1, 1, &(phi), &(theta), x, y, &prj_stat)

#define tanrev(x, y, prj, phi, theta) \
        tanx2s(prj, 1, 1, 1, 1, &(x), &(y), phi, theta, &prj_stat)
#define tanfwd(phi, theta, prj, x, y) \
        tans2x(prj, 1, 1, 1, 1, &(phi), &(theta), x, y, &prj_stat)

#define stgrev(x, y, prj, phi, theta) \
        stgx2s(prj, 1, 1, 1, 1, &(x), &(y), phi, theta, &prj_stat)
#define stgfwd(phi, theta, prj, x, y) \
        stgs2x(prj, 1, 1, 1, 1, &(phi), &(theta), x, y, &prj_stat)

#define sinrev(x, y, prj, phi, theta) \
        sinx2s(prj, 1, 1, 1, 1, &(x), &(y), phi, theta, &prj_stat)
#define sinfwd(phi, theta, prj, x, y) \
        sins2x(prj, 1, 1, 1, 1, &(phi), &(theta), x, y, &prj_stat)

#define arcrev(x, y, prj, phi, theta) \
        arcx2s(prj, 1, 1, 1, 1, &(x), &(y), phi, theta, &prj_stat)
#define arcfwd(phi, theta, prj, x, y) \
        arcs2x(prj, 1, 1, 1, 1, &(phi), &(theta), x, y, &prj_stat)

#define zpnrev(x, y, prj, phi, theta) \
        zpnx2s(prj, 1, 1, 1, 1, &(x), &(y), phi, theta, &prj_stat)
#define zpnfwd(phi, theta, prj, x, y) \
        zpns2x(prj, 1, 1, 1, 1, &(phi), &(theta), x, y, &prj_stat)

#define zearev(x, y, prj, phi, theta) \
        zeax2s(prj, 1, 1, 1, 1, &(x), &(y), phi, theta, &prj_stat)
#define zeafwd(phi, theta, prj, x, y) \
        zeas2x(prj, 1, 1, 1, 1, &(phi), &(theta), x, y, &prj_stat)

#define airrev(x, y, prj, phi, theta) \
        airx2s(prj, 1, 1, 1, 1, &(x), &(y), phi, theta, &prj_stat)
#define airfwd(phi, theta, prj, x, y) \
        airs2x(prj, 1, 1, 1, 1, &(phi), &(theta), x, y, &prj_stat)

#define cyprev(x, y, prj, phi, theta) \
        cypx2s(prj, 1, 1, 1, 1, &(x), &(y), phi, theta, &prj_stat)
#define cypfwd(phi, theta, prj, x, y) \
        cyps2x(prj, 1, 1, 1, 1, &(phi), &(theta), x, y, &prj_stat)

#define cearev(x, y, prj, phi, theta) \
        ceax2s(prj, 1, 1, 1, 1, &(x), &(y), phi, theta, &prj_stat)
#define ceafwd(phi, theta, prj, x, y) \
        ceas2x(prj, 1, 1, 1, 1, &(phi), &(theta), x, y, &prj_stat)

#define carrev(x, y, prj, phi, theta) \
        carx2s(prj, 1, 1, 1, 1, &(x), &(y), phi, theta, &prj_stat)
#define carfwd(phi, theta, prj, x, y) \
        cars2x(prj, 1, 1, 1, 1, &(phi), &(theta), x, y, &prj_stat)

#define merrev(x, y, prj, phi, theta) \
        merx2s(prj, 1, 1, 1, 1, &(x), &(y), phi, theta, &prj_stat)
#define merfwd(phi, theta, prj, x, y) \
        mers2x(prj, 1, 1, 1, 1, &(phi), &(theta), x, y, &prj_stat)

#define sflrev(x, y, prj, phi, theta) \
        sflx2s(prj, 1, 1, 1, 1, &(x), &(y), phi, theta, &prj_stat)
#define sflfwd(phi, theta, prj, x, y) \
        sfls2x(prj, 1, 1, 1, 1, &(phi), &(theta), x, y, &prj_stat)

#define parrev(x, y, prj, phi, theta) \
        parx2s(prj, 1, 1, 1, 1, &(x), &(y), phi, theta, &prj_stat)
#define parfwd(phi, theta, prj, x, y) \
        pars2x(prj, 1, 1, 1, 1, &(phi), &(theta), x, y, &prj_stat)

#define molrev(x, y, prj, phi, theta) \
        molx2s(prj, 1, 1, 1, 1, &(x), &(y), phi, theta, &prj_stat)
#define molfwd(phi, theta, prj, x, y) \
        mols2x(prj, 1, 1, 1, 1, &(phi), &(theta), x, y, &prj_stat)

#define aitrev(x, y, prj, phi, theta) \
        aitx2s(prj, 1, 1, 1, 1, &(x), &(y), phi, theta, &prj_stat)
#define aitfwd(phi, theta, prj, x, y) \
        aits2x(prj, 1, 1, 1, 1, &(phi), &(theta), x, y, &prj_stat)

#define coprev(x, y, prj, phi, theta) \
        copx2s(prj, 1, 1, 1, 1, &(x), &(y), phi, theta, &prj_stat)
#define copfwd(phi, theta, prj, x, y) \
        cops2x(prj, 1, 1, 1, 1, &(phi), &(theta), x, y, &prj_stat)

#define coerev(x, y, prj, phi, theta) \
        coex2s(prj, 1, 1, 1, 1, &(x), &(y), phi, theta, &prj_stat)
#define coefwd(phi, theta, prj, x, y) \
        coes2x(prj, 1, 1, 1, 1, &(phi), &(theta), x, y, &prj_stat)

#define codrev(x, y, prj, phi, theta) \
        codx2s(prj, 1, 1, 1, 1, &(x), &(y), phi, theta, &prj_stat)
#define codfwd(phi, theta, prj, x, y) \
        cods2x(prj, 1, 1, 1, 1, &(phi), &(theta), x, y, &prj_stat)

#define coorev(x, y, prj, phi, theta) \
        coox2s(prj, 1, 1, 1, 1, &(x), &(y), phi, theta, &prj_stat)
#define coofwd(phi, theta, prj, x, y) \
        coos2x(prj, 1, 1, 1, 1, &(phi), &(theta), x, y, &prj_stat)

#define bonrev(x, y, prj, phi, theta) \
        bonx2s(prj, 1, 1, 1, 1, &(x), &(y), phi, theta, &prj_stat)
#define bonfwd(phi, theta, prj, x, y) \
        bons2x(prj, 1, 1, 1, 1, &(phi), &(theta), x, y, &prj_stat)

#define pcorev(x, y, prj, phi, theta) \
        pcox2s(prj, 1, 1, 1, 1, &(x), &(y), phi, theta, &prj_stat)
#define pcofwd(phi, theta, prj, x, y) \
        pcos2x(prj, 1, 1, 1, 1, &(phi), &(theta), x, y, &prj_stat)

#define tscrev(x, y, prj, phi, theta) \
        tscx2s(prj, 1, 1, 1, 1, &(x), &(y), phi, theta, &prj_stat)
#define tscfwd(phi, theta, prj, x, y) \
        tscs2x(prj, 1, 1, 1, 1, &(phi), &(theta), x, y, &prj_stat)

#define cscrev(x, y, prj, phi, theta) \
        cscx2s(prj, 1, 1, 1, 1, &(x), &(y), phi, theta, &prj_stat)
#define cscfwd(phi, theta, prj, x, y) \
        cscs2x(prj, 1, 1, 1, 1, &(phi), &(theta), x, y, &prj_stat)

#define qscrev(x, y, prj, phi, theta) \
        qscx2s(prj, 1, 1, 1, 1, &(x), &(y), phi, theta, &prj_stat)
#define qscfwd(phi, theta, prj, x, y) \
        qscs2x(prj, 1, 1, 1, 1, &(phi), &(theta), x, y, &prj_stat)

#define hpxrev(x, y, prj, phi, theta) \
        hpxx2s(prj, 1, 1, 1, 1, &(x), &(y), phi, theta, &prj_stat)
#define hpxfwd(phi, theta, prj, x, y) \
        hpxs2x(prj, 1, 1, 1, 1, &(phi), &(theta), x, y, &prj_stat)


d559 1
a559 1
};
@


4.2.1.1
log
@WCSLIB 4.2 development branch.
@
text
@d3 1
a3 1
*   WCSLIB 4.3 - an implementation of the FITS WCS standard.
d30 1
a30 1
*   $Id: prj.h,v 4.2 2005/09/21 13:21:57 cal103 Exp cal103 $
d33 1
a33 1
*   WCSLIB 4.3 - C routines that implement the spherical map projections
@


4.2.1.2
log
@Removed an extraneous ';' following the closing '}' of the 'extern "C" {'
block provided for use in C++.
@
text
@d4 1
a4 1
*   Copyright (C) 1995-2006, Mark Calabretta
d30 1
a30 1
*   $Id: prj.h,v 4.2.1.1 2005/12/05 02:39:43 cal103 Exp cal103 $
d37 1
a37 1
*      Greisen, E.W., & Calabretta, M.R. 2002, A&A, 395, 1061 (Paper I)
d40 1
a40 1
*      Calabretta, M.R., & Greisen, E.W. 2002, A&A, 395, 1077 (Paper II)
d703 1
a703 1
}
@


4.2.1.3
log
@Inserted padding into the prjprm struct to get alignment on 64-bit machines.
@
text
@d4 1
a4 1
*   Copyright (C) 1995-2007, Mark Calabretta
d30 1
a30 1
*   $Id: prj.h,v 4.2.1.2 2006/08/02 00:14:58 cal103 Exp cal103 $
a505 1
   int    padding;		/* (Dummy inserted for alignment purposes.) */
@


4.2.1.4
log
@Removed WCSLIB 2.x backwards-compatibility measures.
@
text
@d30 1
a30 1
*   $Id: prj.h,v 4.2.1.3 2007/07/12 08:02:46 cal103 Exp cal103 $
d510 3
d518 1
a518 1
/* Use the preprocessor to declare function prototypes (see above). */
d557 146
@


4.2.1.5
log
@Referenced the README file for an overview of the library.
@
text
@d30 1
a30 1
*   $Id: prj.h,v 4.2.1.4 2007/08/08 07:20:03 cal103 Exp cal103 $
a41 2
*   Refer to the README file provided with WCSLIB for an overview of the
*   library.
d43 2
a44 3
*
*   Summary of the prj routines
*   ---------------------------
@


4.2.1.6
log
@Switched to LGPL 3.0.
@
text
@d2 29
a30 30

    WCSLIB 4.3 - an implementation of the FITS WCS standard.
    Copyright (C) 1995-2007, Mark Calabretta

    This file is part of WCSLIB.

    WCSLIB is free software: you can redistribute it and/or modify it under
    the terms of the GNU Lesser General Public License as published by the
    Free Software Foundation, either version 3 of the License, or (at your
    option) any later version.

    WCSLIB is distributed in the hope that it will be useful, but WITHOUT ANY
    WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
    FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for
    more details.

    You should have received a copy of the GNU Lesser General Public License
    along with WCSLIB.  If not, see <http://www.gnu.org/licenses/>.

    Correspondence concerning WCSLIB may be directed to:
       Internet email: mcalabre@@atnf.csiro.au
       Postal address: Dr. Mark Calabretta
                       Australia Telescope National Facility, CSIRO
                       PO Box 76
                       Epping NSW 1710
                       AUSTRALIA

    Author: Mark Calabretta, Australia Telescope National Facility
    http://www.atnf.csiro.au/~mcalabre/index.html
    $Id: prj.h,v 4.2.1.5 2007/08/08 08:40:48 cal103 Exp cal103 $
@


4.1
log
@WCSLIB 4.1: minor changes to the prologue comments.
@
text
@d3 1
a3 1
*   WCSLIB 4.1 - an implementation of the FITS WCS standard.
d30 1
a30 1
*   $Id: prj.h,v 4.0 2005/02/04 05:13:14 cal103 Exp cal103 $
d33 1
a33 1
*   WCSLIB 4.1 - C routines that implement the spherical map projections
@


4.0
log
@WCSLIB 4.0: changed from LGPL to GPL; added the HPX projection; revised the
prologue notes.
@
text
@d3 1
a3 1
*   WCSLIB 4.0 - an implementation of the FITS WCS standard.
d30 1
a30 1
*   $Id: prj.h,v 3.6 2004/08/25 04:19:24 cal103 Exp cal103 $
d33 1
a33 1
*   WCSLIB 4.0 - C routines that implement the spherical map projections
d52 2
a53 2
*   A service routine, prjini(), is provided to initialize the prjprm struct
*   with default values, and another, prjprt(), to print its contents.
d72 1
a72 1
*      prjprt                 Service routine to print the prjprm struct.
d107 2
a108 1
*   prjini() sets all members of a prjprm struct to default values.
@


3.6
log
@WCSLIB 3.6: "error status/code/number" is now referred to consistently as the
"status return value"; replaced "error" with "failed" in status messages;
removed support for K&R C.
@
text
@d3 2
a4 2
*   WCSLIB 3.6 - an implementation of the FITS WCS convention.
*   Copyright (C) 1995-2004, Mark Calabretta
d6 13
a18 13
*   This library is free software; you can redistribute it and/or modify it
*   under the terms of the GNU Library General Public License as published
*   by the Free Software Foundation; either version 2 of the License, or (at
*   your option) any later version.
*
*   This library is distributed in the hope that it will be useful, but
*   WITHOUT ANY WARRANTY; without even the implied warranty of
*   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library
*   General Public License for more details.
*
*   You should have received a copy of the GNU Library General Public License
*   along with this library; if not, write to the Free Software Foundation,
*   Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
d30 1
a30 1
*   $Id: prj.h,v 3.5 2004/06/28 02:13:38 mcalabre Exp mcalabre $
d33 2
a34 2
*   WCSLIB 3.6 - C routines that implement the spherical map projections
*   recognized by the FITS World Coordinate System (WCS) convention.  Refer to
d45 16
d62 6
a67 1
*   spherical projection, *s2x(), and deprojection, *x2s().
d69 1
a69 3
*   Initialization routines, *set(), compute intermediate values from the
*   projection parameters but need not be called explicitly - see the
*   explanation of the flag member of the prjprm struct below.
d102 1
d105 3
a107 4
*   Initialization routine for the prjprm struct; prjini()
*   ------------------------------------------------------
*   This service routine may be used to set the members of a prjprm struct to
*   default values.
d121 1
a121 1
*   This service routine may be used to print the members of a prjprm struct.
d147 4
a150 4
*   Initialization routine; *set()
*   ------------------------------
*   Initializes a prjprm data structure according to information supplied
*   within it (see "Projection parameters" below).
d153 2
a154 2
*   prjx2s() and prjs2x() if the "flag" structure member is anything other
*   than a predefined magic value.
d169 2
a170 2
*   Compute native spherical coordinates (phi,theta) from (x,y) coordinates in
*   the plane of projection.
d200 2
a201 2
*   Compute (x,y) coordinates in the plane of projection from native spherical
*   coordinates (phi,theta).
d276 2
a277 2
*              POLYCONIC, and QUADCUBE.  The category name may also be
*              identified via the prj_categories character array.
d439 2
a440 2
                 PSEUDOCYLINDRICAL, QUADCUBE, ZENITHAL;
extern const char prj_categories[8][32];
d443 1
a443 1
extern const char prj_codes[26][4];
d552 1
d694 5
@


3.5
log
@WCSLIB 3.5: renamed C-preprocessor macros INI, PRT, SET, X2S and S2X to
SPCINI, SPCPRT, SPCSET, SPCX2S and SPCS2X to reduce the likelihood of
namespace clashes; added the alternate version code to FITS WCS keywords
mentioned in comments.
@
text
@d3 1
a3 1
*   WCSLIB 3.5 - an implementation of the FITS WCS convention.
d30 1
a30 1
*   $Id: prj.h,v 3.4 2004/02/11 00:15:03 mcalabre Exp mcalabre $
d33 1
a33 1
*   WCSLIB 3.5 - C routines that implement the spherical map projections
d95 1
a95 1
*               int      Error status
d109 1
a109 1
*               int      Error status
d142 1
a142 1
*               int      Error status
d166 1
a166 1
*      stat     int[]    Error status for each vector element:
d171 1
a171 1
*               int      Error status
d198 1
a198 1
*      stat     int[]    Error status for each vector element:
d203 1
a203 1
*               int      Error status
d382 3
a384 3
*   Error codes
*   -----------
*   Error messages to match the error codes returned from each function are
d396 2
a397 2
*   diverge).  Refer to the tproj1.c and tproj2.c test routines which
*   accompany this software.
a407 5
#if !defined(__STDC__) && !defined(__cplusplus)
#ifndef const
#define const
#endif
#endif
a411 1

a447 1
#if __STDC__ || defined(__cplusplus)
a456 7
#else
#define PRJINI
#define PRJPRT
#define PRJSET
#define PRJX2S
#define PRJS2X
#endif
d674 1
@


3.4
log
@WCSLIB 3.4: trivial fix to prologue comment.
@
text
@d3 1
a3 1
*   WCSLIB 3.4 - an implementation of the FITS WCS convention.
d28 3
d33 1
a33 1
*   WCSLIB 3.4 - C routines that implement the spherical map projections
d230 4
a233 4
*         Projection parameters.  These correspond to the PVi_m keywords in
*         FITS, so pv[0] is PVi_0, pv[1] is PVi_1, etc., where i denotes the
*         latitude-like axis.  Many projections use pv[1] (PVi_1), some also
*         use pv[2] (PVi_2) and SZP uses pv[3] (PVi_3).  ZPN is the only
a398 3
*
*   Author: Mark Calabretta, Australia Telescope National Facility
*   $Id: prj.h,v 3.3 2003/10/21 08:51:00 mcalabre Exp mcalabre $
d434 2
a435 2
#ifdef INI
#undef INI
d438 2
a439 2
#ifdef PRT
#undef PRT
d442 2
a443 2
#ifdef SET
#undef SET
d446 2
a447 2
#ifdef X2S
#undef X2S
d450 2
a451 2
#ifdef S2X
#undef S2X
d455 9
a463 9
#define INI struct prjprm *
#define PRT const struct prjprm *
#define SET struct prjprm *
#define X2S struct prjprm *, int, int, int, int, \
            const double[], const double[],      \
            double[], double[], int[]
#define S2X struct prjprm *, int, int, int, int, \
            const double[], const double[],      \
            double[], double[], int[]
d465 5
a469 5
#define INI
#define PRT
#define SET
#define X2S
#define S2X
d501 2
a502 2
   int (*prjx2s)(X2S);		/* Pointers to the spherical projection and */
   int (*prjs2x)(S2X);		/* deprojection functions.                  */
d512 2
a513 2
int prjini(INI);
int prjprt(PRT);
d516 3
a518 3
   int CODE##set(SET); \
   int CODE##x2s(X2S); \
   int CODE##s2x(S2X);
@


3.3
log
@WCSLIB 3.3
@
text
@d3 2
a4 2
*   WCSLIB 3.3 - an implementation of the FITS WCS convention.
*   Copyright (C) 1995-2003, Mark Calabretta
d30 1
a30 1
*   WCSLIB 3.3 - C routines that implement the spherical map projections
d228 1
a228 1
*         FITS, so pv[0] is PVi_0, pv[1] is PVi_1, etc., where j denotes the
d398 1
a398 1
*   $Id: prj.h,v 3.2 2003/09/09 04:04:04 mcalabre Exp mcalabre $
@


3.2
log
@WCSLIB 3.2: rationalized function return codes and messages; declared
prj_stat as extern.
@
text
@d3 1
a3 1
*   WCSLIB 3.2 - an implementation of the FITS WCS convention.
d30 1
a30 1
*   WCSLIB 3.2 - C routines that implement the spherical map projections
d398 1
a398 1
*   $Id: prj.h,v 3.1 2003/04/28 03:50:41 mcalabre Exp mcalabre $
@


3.1
log
@WCSLIB 3.1
Added "global" and "divergent" prjprm struct members; added macro definition
of PRJLEN.
@
text
@d3 1
a3 1
*   WCSLIB 3.1 - an implementation of the FITS WCS convention.
d30 1
a30 1
*   WCSLIB 3.1 - C routines that implement the spherical map projections
d94 1
d108 1
d141 2
a142 1
*                           1: Invalid projection parameters.
d170 4
a173 2
*                           1: Invalid projection parameters.
*                           2: Some value(s) of (x,y) were invalid.
d202 4
a205 2
*                           1: Invalid projection parameters.
*                           2: Some value(s) of (phi,theta) were invalid.
d381 2
a382 3
*   Error messages to match the error codes for the *set(), *x2s() and *s2x()
*   routines are encoded in the prjset_errmsg, prjx2s_errmsg, and
*   prjs2x_errmsg character arrays.
d398 1
a398 1
*   $Id: prj.h,v 3.0 2003/04/01 04:10:53 mcalabre Exp mcalabre $
d418 6
a423 3
extern const char *prjset_errmsg[];
extern const char *prjx2s_errmsg[];
extern const char *prjs2x_errmsg[];
d550 2
a551 2
extern const char *prjfwd_errmsg[];
extern const char *prjrev_errmsg[];
d553 1
a553 1
int proj_stat;
d555 1
a555 1
        prjx2s(prj, 1, 1, 1, 1, &(x), &(y), phi, theta, &proj_stat)
d557 1
a557 1
        prjs2x(prj, 1, 1, 1, 1, &(phi), &(theta), x, y, &proj_stat)
d560 1
a560 1
        azpx2s(prj, 1, 1, 1, 1, &(x), &(y), phi, theta, &proj_stat)
d562 1
a562 1
        azps2x(prj, 1, 1, 1, 1, &(phi), &(theta), x, y, &proj_stat)
d565 1
a565 1
        szpx2s(prj, 1, 1, 1, 1, &(x), &(y), phi, theta, &proj_stat)
d567 1
a567 1
        szps2x(prj, 1, 1, 1, 1, &(phi), &(theta), x, y, &proj_stat)
d570 1
a570 1
        tanx2s(prj, 1, 1, 1, 1, &(x), &(y), phi, theta, &proj_stat)
d572 1
a572 1
        tans2x(prj, 1, 1, 1, 1, &(phi), &(theta), x, y, &proj_stat)
d575 1
a575 1
        stgx2s(prj, 1, 1, 1, 1, &(x), &(y), phi, theta, &proj_stat)
d577 1
a577 1
        stgs2x(prj, 1, 1, 1, 1, &(phi), &(theta), x, y, &proj_stat)
d580 1
a580 1
        sinx2s(prj, 1, 1, 1, 1, &(x), &(y), phi, theta, &proj_stat)
d582 1
a582 1
        sins2x(prj, 1, 1, 1, 1, &(phi), &(theta), x, y, &proj_stat)
d585 1
a585 1
        arcx2s(prj, 1, 1, 1, 1, &(x), &(y), phi, theta, &proj_stat)
d587 1
a587 1
        arcs2x(prj, 1, 1, 1, 1, &(phi), &(theta), x, y, &proj_stat)
d590 1
a590 1
        zpnx2s(prj, 1, 1, 1, 1, &(x), &(y), phi, theta, &proj_stat)
d592 1
a592 1
        zpns2x(prj, 1, 1, 1, 1, &(phi), &(theta), x, y, &proj_stat)
d595 1
a595 1
        zeax2s(prj, 1, 1, 1, 1, &(x), &(y), phi, theta, &proj_stat)
d597 1
a597 1
        zeas2x(prj, 1, 1, 1, 1, &(phi), &(theta), x, y, &proj_stat)
d600 1
a600 1
        airx2s(prj, 1, 1, 1, 1, &(x), &(y), phi, theta, &proj_stat)
d602 1
a602 1
        airs2x(prj, 1, 1, 1, 1, &(phi), &(theta), x, y, &proj_stat)
d605 1
a605 1
        cypx2s(prj, 1, 1, 1, 1, &(x), &(y), phi, theta, &proj_stat)
d607 1
a607 1
        cyps2x(prj, 1, 1, 1, 1, &(phi), &(theta), x, y, &proj_stat)
d610 1
a610 1
        ceax2s(prj, 1, 1, 1, 1, &(x), &(y), phi, theta, &proj_stat)
d612 1
a612 1
        ceas2x(prj, 1, 1, 1, 1, &(phi), &(theta), x, y, &proj_stat)
d615 1
a615 1
        carx2s(prj, 1, 1, 1, 1, &(x), &(y), phi, theta, &proj_stat)
d617 1
a617 1
        cars2x(prj, 1, 1, 1, 1, &(phi), &(theta), x, y, &proj_stat)
d620 1
a620 1
        merx2s(prj, 1, 1, 1, 1, &(x), &(y), phi, theta, &proj_stat)
d622 1
a622 1
        mers2x(prj, 1, 1, 1, 1, &(phi), &(theta), x, y, &proj_stat)
d625 1
a625 1
        sflx2s(prj, 1, 1, 1, 1, &(x), &(y), phi, theta, &proj_stat)
d627 1
a627 1
        sfls2x(prj, 1, 1, 1, 1, &(phi), &(theta), x, y, &proj_stat)
d630 1
a630 1
        parx2s(prj, 1, 1, 1, 1, &(x), &(y), phi, theta, &proj_stat)
d632 1
a632 1
        pars2x(prj, 1, 1, 1, 1, &(phi), &(theta), x, y, &proj_stat)
d635 1
a635 1
        molx2s(prj, 1, 1, 1, 1, &(x), &(y), phi, theta, &proj_stat)
d637 1
a637 1
        mols2x(prj, 1, 1, 1, 1, &(phi), &(theta), x, y, &proj_stat)
d640 1
a640 1
        aitx2s(prj, 1, 1, 1, 1, &(x), &(y), phi, theta, &proj_stat)
d642 1
a642 1
        aits2x(prj, 1, 1, 1, 1, &(phi), &(theta), x, y, &proj_stat)
d645 1
a645 1
        copx2s(prj, 1, 1, 1, 1, &(x), &(y), phi, theta, &proj_stat)
d647 1
a647 1
        cops2x(prj, 1, 1, 1, 1, &(phi), &(theta), x, y, &proj_stat)
d650 1
a650 1
        coex2s(prj, 1, 1, 1, 1, &(x), &(y), phi, theta, &proj_stat)
d652 1
a652 1
        coes2x(prj, 1, 1, 1, 1, &(phi), &(theta), x, y, &proj_stat)
d655 1
a655 1
        codx2s(prj, 1, 1, 1, 1, &(x), &(y), phi, theta, &proj_stat)
d657 1
a657 1
        cods2x(prj, 1, 1, 1, 1, &(phi), &(theta), x, y, &proj_stat)
d660 1
a660 1
        coox2s(prj, 1, 1, 1, 1, &(x), &(y), phi, theta, &proj_stat)
d662 1
a662 1
        coos2x(prj, 1, 1, 1, 1, &(phi), &(theta), x, y, &proj_stat)
d665 1
a665 1
        bonx2s(prj, 1, 1, 1, 1, &(x), &(y), phi, theta, &proj_stat)
d667 1
a667 1
        bons2x(prj, 1, 1, 1, 1, &(phi), &(theta), x, y, &proj_stat)
d670 1
a670 1
        pcox2s(prj, 1, 1, 1, 1, &(x), &(y), phi, theta, &proj_stat)
d672 1
a672 1
        pcos2x(prj, 1, 1, 1, 1, &(phi), &(theta), x, y, &proj_stat)
d675 1
a675 1
        tscx2s(prj, 1, 1, 1, 1, &(x), &(y), phi, theta, &proj_stat)
d677 1
a677 1
        tscs2x(prj, 1, 1, 1, 1, &(phi), &(theta), x, y, &proj_stat)
d680 1
a680 1
        cscx2s(prj, 1, 1, 1, 1, &(x), &(y), phi, theta, &proj_stat)
d682 1
a682 1
        cscs2x(prj, 1, 1, 1, 1, &(phi), &(theta), x, y, &proj_stat)
d685 1
a685 1
        qscx2s(prj, 1, 1, 1, 1, &(x), &(y), phi, theta, &proj_stat)
d687 1
a687 1
        qscs2x(prj, 1, 1, 1, 1, &(phi), &(theta), x, y, &proj_stat)
@


3.0
log
@WCSLIB 3.0 (renamed from proj.h).
@
text
@d3 1
a3 1
*   WCSLIB 3.0 - an implementation of the FITS WCS convention.
d30 1
a30 1
*   WCSLIB 3.0 - C routines that implement the spherical map projections
d240 2
a241 1
*      int  category, pvrange, simplezen, equiareal, conformal
d254 5
a258 2
*            - equiareal is true if the projection is equal area, and
*            - conformal is true if the projection is conformal.
d392 1
a392 1
*   $Id: proj.h,v 2.12 2001/11/15 02:37:31 mcalabre Exp $
d485 2
d498 2
@


2.13
log
@Updated date in copyright notice.
@
text
@d1 1
a1 1
/*=============================================================================
d3 2
a4 2
*   WCSLIB - an implementation of the FITS WCS proposal.
*   Copyright (C) 1995-2002, Mark Calabretta
d22 4
a25 4
*      Postal address: Dr. Mark Calabretta,
*                      Australia Telescope National Facility,
*                      P.O. Box 76,
*                      Epping, NSW, 2121,
d28 359
d388 1
a388 1
*   $Id: proj.h,v 2.12 2001/11/15 02:37:31 mcalabre Exp mcalabre $
d398 38
a435 2
extern int npcode;
extern char pcodes[26][4];
d437 2
a438 19
struct prjprm {
   char   code[4];
   int    flag;
   double phi0, theta0;
   double r0;
   double p[10];
   double w[20];
   int    n;

#if __STDC__  || defined(__cplusplus)
   int (*prjfwd)(const double, const double,
                 struct prjprm *,
                 double *, double *);
   int (*prjrev)(const double, const double,
                 struct prjprm *,
                 double *, double *);
#else
   int (*prjfwd)();
   int (*prjrev)();
a439 1
};
d442 9
a450 81
   int prjset(const char [], struct prjprm *);
   int prjfwd(const double, const double, struct prjprm *, double *, double *);
   int prjrev(const double, const double, struct prjprm *, double *, double *);
   int azpset(struct prjprm *);
   int azpfwd(const double, const double, struct prjprm *, double *, double *);
   int azprev(const double, const double, struct prjprm *, double *, double *);
   int szpset(struct prjprm *);
   int szpfwd(const double, const double, struct prjprm *, double *, double *);
   int szprev(const double, const double, struct prjprm *, double *, double *);
   int tanset(struct prjprm *);
   int tanfwd(const double, const double, struct prjprm *, double *, double *);
   int tanrev(const double, const double, struct prjprm *, double *, double *);
   int stgset(struct prjprm *);
   int stgfwd(const double, const double, struct prjprm *, double *, double *);
   int stgrev(const double, const double, struct prjprm *, double *, double *);
   int sinset(struct prjprm *);
   int sinfwd(const double, const double, struct prjprm *, double *, double *);
   int sinrev(const double, const double, struct prjprm *, double *, double *);
   int arcset(struct prjprm *);
   int arcfwd(const double, const double, struct prjprm *, double *, double *);
   int arcrev(const double, const double, struct prjprm *, double *, double *);
   int zpnset(struct prjprm *);
   int zpnfwd(const double, const double, struct prjprm *, double *, double *);
   int zpnrev(const double, const double, struct prjprm *, double *, double *);
   int zeaset(struct prjprm *);
   int zeafwd(const double, const double, struct prjprm *, double *, double *);
   int zearev(const double, const double, struct prjprm *, double *, double *);
   int airset(struct prjprm *);
   int airfwd(const double, const double, struct prjprm *, double *, double *);
   int airrev(const double, const double, struct prjprm *, double *, double *);
   int cypset(struct prjprm *);
   int cypfwd(const double, const double, struct prjprm *, double *, double *);
   int cyprev(const double, const double, struct prjprm *, double *, double *);
   int ceaset(struct prjprm *);
   int ceafwd(const double, const double, struct prjprm *, double *, double *);
   int cearev(const double, const double, struct prjprm *, double *, double *);
   int carset(struct prjprm *);
   int carfwd(const double, const double, struct prjprm *, double *, double *);
   int carrev(const double, const double, struct prjprm *, double *, double *);
   int merset(struct prjprm *);
   int merfwd(const double, const double, struct prjprm *, double *, double *);
   int merrev(const double, const double, struct prjprm *, double *, double *);
   int sflset(struct prjprm *);
   int sflfwd(const double, const double, struct prjprm *, double *, double *);
   int sflrev(const double, const double, struct prjprm *, double *, double *);
   int parset(struct prjprm *);
   int parfwd(const double, const double, struct prjprm *, double *, double *);
   int parrev(const double, const double, struct prjprm *, double *, double *);
   int molset(struct prjprm *);
   int molfwd(const double, const double, struct prjprm *, double *, double *);
   int molrev(const double, const double, struct prjprm *, double *, double *);
   int aitset(struct prjprm *);
   int aitfwd(const double, const double, struct prjprm *, double *, double *);
   int aitrev(const double, const double, struct prjprm *, double *, double *);
   int copset(struct prjprm *);
   int copfwd(const double, const double, struct prjprm *, double *, double *);
   int coprev(const double, const double, struct prjprm *, double *, double *);
   int coeset(struct prjprm *);
   int coefwd(const double, const double, struct prjprm *, double *, double *);
   int coerev(const double, const double, struct prjprm *, double *, double *);
   int codset(struct prjprm *);
   int codfwd(const double, const double, struct prjprm *, double *, double *);
   int codrev(const double, const double, struct prjprm *, double *, double *);
   int cooset(struct prjprm *);
   int coofwd(const double, const double, struct prjprm *, double *, double *);
   int coorev(const double, const double, struct prjprm *, double *, double *);
   int bonset(struct prjprm *);
   int bonfwd(const double, const double, struct prjprm *, double *, double *);
   int bonrev(const double, const double, struct prjprm *, double *, double *);
   int pcoset(struct prjprm *);
   int pcofwd(const double, const double, struct prjprm *, double *, double *);
   int pcorev(const double, const double, struct prjprm *, double *, double *);
   int tscset(struct prjprm *);
   int tscfwd(const double, const double, struct prjprm *, double *, double *);
   int tscrev(const double, const double, struct prjprm *, double *, double *);
   int cscset(struct prjprm *);
   int cscfwd(const double, const double, struct prjprm *, double *, double *);
   int cscrev(const double, const double, struct prjprm *, double *, double *);
   int qscset(struct prjprm *);
   int qscfwd(const double, const double, struct prjprm *, double *, double *);
   int qscrev(const double, const double, struct prjprm *, double *, double *);
d452 5
a456 27
   int prjset(), prjfwd(), prjrev();
   int azpset(), azpfwd(), azprev();
   int szpset(), szpfwd(), szprev();
   int tanset(), tanfwd(), tanrev();
   int stgset(), stgfwd(), stgrev();
   int sinset(), sinfwd(), sinrev();
   int arcset(), arcfwd(), arcrev();
   int zpnset(), zpnfwd(), zpnrev();
   int zeaset(), zeafwd(), zearev();
   int airset(), airfwd(), airrev();
   int cypset(), cypfwd(), cyprev();
   int ceaset(), ceafwd(), cearev();
   int carset(), carfwd(), carrev();
   int merset(), merfwd(), merrev();
   int sflset(), sflfwd(), sflrev();
   int parset(), parfwd(), parrev();
   int molset(), molfwd(), molrev();
   int aitset(), aitfwd(), aitrev();
   int copset(), copfwd(), coprev();
   int coeset(), coefwd(), coerev();
   int codset(), codfwd(), codrev();
   int cooset(), coofwd(), coorev();
   int bonset(), bonfwd(), bonrev();
   int pcoset(), pcofwd(), pcorev();
   int tscset(), tscfwd(), tscrev();
   int cscset(), cscfwd(), cscrev();
   int qscset(), qscfwd(), qscrev();
d459 74
a532 1
extern const char *prjset_errmsg[];
d535 136
@


2.12
log
@Added support for the SZP projection with szpset(), szpfwd() and szprev();
added phi0 to the prjprm struct.
@
text
@d4 1
a4 1
*   Copyright (C) 1995-2001, Mark Calabretta
d29 1
a29 1
*   $Id: proj.h,v 2.11 2000/12/05 02:11:52 mcalabre Exp mcalabre $
@


2.11
log
@Added npcode and pcodes extern declarations (moved from cel.h); removed
PRJSET preprocessor macro; added code[] and theta0 to prjprm; added prjfwd
and prjrev to prjprm (moved from celprm); reordered projections to match
paper.
@
text
@d4 1
a4 1
*   Copyright (C) 1995-2000, Mark Calabretta
d29 1
a29 1
*   $Id: proj.h,v 2.11 2000/12/04 08:42:30 mcalabre Exp mcalabre $
d40 1
a40 1
extern char pcodes[25][4];
d43 3
a45 1
   int flag;
d48 1
a48 4

   char   code[4];
   double theta0;
   double w[10];
d71 3
d149 1
@


2.10
log
@Updated date in copyright notice.
@
text
@d29 1
a29 1
*   $Id: proj.h,v 2.9 1999/12/13 07:27:21 mcalabre Exp mcalabre $
d39 3
a43 1
   int n;
d46 3
d50 13
d66 3
d75 3
a80 3
   int stgset(struct prjprm *);
   int stgfwd(const double, const double, struct prjprm *, double *, double *);
   int stgrev(const double, const double, struct prjprm *, double *, double *);
d96 3
d105 12
a116 3
   int ceaset(struct prjprm *);
   int ceafwd(const double, const double, struct prjprm *, double *, double *);
   int cearev(const double, const double, struct prjprm *, double *, double *);
d120 3
a125 3
   int coeset(struct prjprm *);
   int coefwd(const double, const double, struct prjprm *, double *, double *);
   int coerev(const double, const double, struct prjprm *, double *, double *);
d135 3
a137 12
   int glsset(struct prjprm *);
   int glsfwd(const double, const double, struct prjprm *, double *, double *);
   int glsrev(const double, const double, struct prjprm *, double *, double *);
   int parset(struct prjprm *);
   int parfwd(const double, const double, struct prjprm *, double *, double *);
   int parrev(const double, const double, struct prjprm *, double *, double *);
   int aitset(struct prjprm *);
   int aitfwd(const double, const double, struct prjprm *, double *, double *);
   int aitrev(const double, const double, struct prjprm *, double *, double *);
   int molset(struct prjprm *);
   int molfwd(const double, const double, struct prjprm *, double *, double *);
   int molrev(const double, const double, struct prjprm *, double *, double *);
a143 3
   int tscset(struct prjprm *);
   int tscfwd(const double, const double, struct prjprm *, double *, double *);
   int tscrev(const double, const double, struct prjprm *, double *, double *);
d145 1
d148 1
a149 1
   int stgset(), stgfwd(), stgrev();
d155 1
d158 4
a161 1
   int ceaset(), ceafwd(), cearev();
d163 1
a164 1
   int coeset(), coefwd(), coerev();
d168 1
a168 4
   int glsset(), glsfwd(), glsrev();
   int parset(), parfwd(), parrev();
   int aitset(), aitfwd(), aitrev();
   int molset(), molfwd(), molrev();
a170 1
   int tscset(), tscfwd(), tscrev();
a175 2

#define PRJSET 137
@


2.9
log
@Revised include file handling.
@
text
@d4 1
a4 1
*   Copyright (C) 1995-1999, Mark Calabretta
d29 1
a29 1
*   $Id: proj.h,v 2.8 1999/11/19 00:21:36 mcalabre Exp mcalabre $
@


2.8
log
@Deimplemented the DSS projection, restoring the original dimensions of p[]
and w[].
@
text
@d29 1
a29 1
*   $Id: proj.h,v 2.7 1999/05/26 01:32:18 mcalabre Exp mcalabre $
a33 2

#include "wcstrig.h"
@


2.7
log
@Added RCS id.
@
text
@d29 1
a29 1
*   $Id$
d45 2
a46 2
   double p[100];
   double w[30];
a124 3
   int dssset(struct prjprm *);
   int dssfwd(const double, const double, struct prjprm *, double *, double *);
   int dssrev(const double, const double, struct prjprm *, double *, double *);
a150 1
   int dssset(), dssfwd(), dssrev();
@


2.6
log
@Added copyright notice; prefixed include guard names with "WCSLIB_".
@
text
@d28 2
@


2.5
log
@Implemented the DSS projection, increasing the number of projection
parameters from 10 to 100, the number of elements in the work array from 10
to 30, and adding function prototypes for dssset(), dssfwd(), and dssrev().
@
text
@d1 28
a28 2
#ifndef PROJ
#define PROJ
d30 3
d165 1
a165 1
#endif /* PROJ */
@


2.4
log
@Extracted mathematical constant definitions into wcsmath.h.
@
text
@d14 2
a15 2
   double p[10];
   double w[10];
d94 3
d123 1
@


2.3
log
@Moved the definition of PI before the inclusion of wcstrig.h.  wcstrig.h
includes math.h which in Linux defines PI if not already defined.
@
text
@a3 6
#define PI 3.141592653589793238462643
#define D2R PI/180.0
#define R2D 180.0/PI
#define SQRT2 1.4142135623730950488
#define SQRT2INV 1.0/SQRT2

@


2.2
log
@Include wcstrig.h earlier to avoid nested "extern C {...}".
@
text
@d4 6
a130 6

#define PI 3.141592653589793238462643
#define D2R PI/180.0
#define R2D 180.0/PI
#define SQRT2 1.4142135623730950488
#define SQRT2INV 1.0/SQRT2
@


2.1
log
@Added const-correctness to function arguments.
Added external arrays of error messages indexed by function return value.
Adapted to C++ usage.
@
text
@d4 2
a8 2

#include "wcstrig.h"
@


2.0
log
@WCSLIB 2.0
@
text
@d4 4
d18 1
a18 1
#if __STDC__
d20 2
a21 2
   int azpfwd(double, double, struct prjprm *, double *, double *);
   int azprev(double, double, struct prjprm *, double *, double *);
d23 2
a24 2
   int tanfwd(double, double, struct prjprm *, double *, double *);
   int tanrev(double, double, struct prjprm *, double *, double *);
d26 2
a27 2
   int sinfwd(double, double, struct prjprm *, double *, double *);
   int sinrev(double, double, struct prjprm *, double *, double *);
d29 2
a30 2
   int stgfwd(double, double, struct prjprm *, double *, double *);
   int stgrev(double, double, struct prjprm *, double *, double *);
d32 2
a33 2
   int arcfwd(double, double, struct prjprm *, double *, double *);
   int arcrev(double, double, struct prjprm *, double *, double *);
d35 2
a36 2
   int zpnfwd(double, double, struct prjprm *, double *, double *);
   int zpnrev(double, double, struct prjprm *, double *, double *);
d38 2
a39 2
   int zeafwd(double, double, struct prjprm *, double *, double *);
   int zearev(double, double, struct prjprm *, double *, double *);
d41 2
a42 2
   int airfwd(double, double, struct prjprm *, double *, double *);
   int airrev(double, double, struct prjprm *, double *, double *);
d44 2
a45 2
   int cypfwd(double, double, struct prjprm *, double *, double *);
   int cyprev(double, double, struct prjprm *, double *, double *);
d47 2
a48 2
   int carfwd(double, double, struct prjprm *, double *, double *);
   int carrev(double, double, struct prjprm *, double *, double *);
d50 2
a51 2
   int merfwd(double, double, struct prjprm *, double *, double *);
   int merrev(double, double, struct prjprm *, double *, double *);
d53 2
a54 2
   int ceafwd(double, double, struct prjprm *, double *, double *);
   int cearev(double, double, struct prjprm *, double *, double *);
d56 2
a57 2
   int copfwd(double, double, struct prjprm *, double *, double *);
   int coprev(double, double, struct prjprm *, double *, double *);
d59 2
a60 2
   int codfwd(double, double, struct prjprm *, double *, double *);
   int codrev(double, double, struct prjprm *, double *, double *);
d62 2
a63 2
   int coefwd(double, double, struct prjprm *, double *, double *);
   int coerev(double, double, struct prjprm *, double *, double *);
d65 2
a66 2
   int coofwd(double, double, struct prjprm *, double *, double *);
   int coorev(double, double, struct prjprm *, double *, double *);
d68 2
a69 2
   int bonfwd(double, double, struct prjprm *, double *, double *);
   int bonrev(double, double, struct prjprm *, double *, double *);
d71 2
a72 2
   int pcofwd(double, double, struct prjprm *, double *, double *);
   int pcorev(double, double, struct prjprm *, double *, double *);
d74 2
a75 2
   int glsfwd(double, double, struct prjprm *, double *, double *);
   int glsrev(double, double, struct prjprm *, double *, double *);
d77 2
a78 2
   int parfwd(double, double, struct prjprm *, double *, double *);
   int parrev(double, double, struct prjprm *, double *, double *);
d80 2
a81 2
   int aitfwd(double, double, struct prjprm *, double *, double *);
   int aitrev(double, double, struct prjprm *, double *, double *);
d83 2
a84 2
   int molfwd(double, double, struct prjprm *, double *, double *);
   int molrev(double, double, struct prjprm *, double *, double *);
d86 2
a87 2
   int cscfwd(double, double, struct prjprm *, double *, double *);
   int cscrev(double, double, struct prjprm *, double *, double *);
d89 2
a90 2
   int qscfwd(double, double, struct prjprm *, double *, double *);
   int qscrev(double, double, struct prjprm *, double *, double *);
d92 3
a94 3
   int tscfwd(double, double, struct prjprm *, double *, double *);
   int tscrev(double, double, struct prjprm *, double *, double *);
#else /* not __STDC__ */
d120 5
a124 1
#endif /* __STDC__ */
d133 4
@


1.1
log
@Initial revision
@
text
@@
