File indexing completed on 2024-04-28 07:31:38
0001 /* ----------------------------------------------------------------------------- 0002 0003 SPDX-FileCopyrightText: 1997-2016 Martin Reinecke, 0004 SPDX-FileCopyrightText: 1997-2016 Krzysztof M. Gorski 0005 SPDX-FileCopyrightText: 1997-2016 Eric Hivon 0006 SPDX-FileCopyrightText: Benjamin D. Wandelt 0007 SPDX-FileCopyrightText: Anthony J. Banday, 0008 SPDX-FileCopyrightText: Matthias Bartelmann, 0009 SPDX-FileCopyrightText: Reza Ansari 0010 SPDX-FileCopyrightText: Kenneth M. Ganga 0011 0012 This file is part of HEALPix. 0013 0014 Based on work by Pavel Mraz from SkyTechX. 0015 0016 Modified by Jasem Mutlaq for KStars: 0017 SPDX-FileCopyrightText: Jasem Mutlaq <mutlaqja@ikarustech.com> 0018 0019 SPDX-License-Identifier: GPL-2.0-or-later 0020 0021 For more information about HEALPix see https://healpix.sourceforge.io/ 0022 0023 ---------------------------------------------------------------------------*/ 0024 0025 #pragma once 0026 0027 #include "hips.h" 0028 0029 #include <QVector3D> 0030 0031 class SkyPoint; 0032 0033 class HEALPix 0034 { 0035 public: 0036 HEALPix() = default; 0037 0038 void getCornerPoints(int level, int pix, SkyPoint *skyCoords); 0039 void neighbours(int nside, qint32 ipix, int *result); 0040 int getPix(int level, double ra, double dec); 0041 void getPixChilds(int pix, int *childs); 0042 0043 private: 0044 void nest2xyf(int nside, int pix, int *ix, int *iy, int *face_num); 0045 QVector3D toVec3(double fx, double fy, int face); 0046 void boundaries(qint32 nside, qint32 pix, int step, QVector3D *out); 0047 int ang2pix_nest_z_phi(qint32 nside_, double z, double phi); 0048 void xyz2sph(const QVector3D &vec, double &l, double &b); 0049 }; 0050