Skip to content

Commit b4a5cac

Browse files
authored
Discovery of DSO (#3084)
Added support for the info for year of discovery and name of discoverer for Messier catalog. I am able to add similar data for objects from NGC/IC catalogs also, but these data should be as 2 extra columns for the 4th version of the main DSO catalog. The discovery info was needed for me when I gave a lecture about the Messier catalog for a club of amateur astronomers in the local planetarium.
1 parent 9359f4e commit b4a5cac

5 files changed

Lines changed: 227 additions & 52 deletions

File tree

nebulae/default/discovery.dat

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
#
2+
# Columns: DSO, Year of discovery, Discoverer
3+
# Separator: [tab]
4+
#
5+
# Source:
6+
# - SEDS Messier Database: http://www.messier.seds.org
7+
#
8+
M 1 1731 John Bevis
9+
M 2 1746 Jean-Dominique Maraldi
10+
M 3 1764 Charles Messier
11+
M 4 1746 Philippe Loys de Chéseaux
12+
M 5 1702 Gottfried Kirch
13+
M 6 1654 Giovanni Batista Hodierna
14+
M 7 130 Ptolemy
15+
M 8 1654 Giovanni Batista Hodierna
16+
M 9 1764 Charles Messier
17+
M 10 1764 Charles Messier
18+
M 11 1681 Gottfried Kirch
19+
M 12 1764 Charles Messier
20+
M 13 1714 Edmond Halley
21+
M 14 1764 Charles Messier
22+
M 15 1746 Jean-Dominique Maraldi
23+
M 16 1764 Charles Messier
24+
M 17 1745-1746 Philippe Loys de Chéseaux
25+
M 18 1764 Charles Messier
26+
M 19 1764 Charles Messier
27+
M 20 1764 Charles Messier
28+
M 21 1764 Charles Messier
29+
M 22 1665 Abraham Ihle
30+
M 23 1764 Charles Messier
31+
M 24 1764 Charles Messier
32+
M 25 1745-1746 Philippe Loys de Chéseaux
33+
M 26 1764 Charles Messier
34+
M 27 1764 Charles Messier
35+
M 28 1764 Charles Messier
36+
M 29 1764 Charles Messier
37+
M 30 1764 Charles Messier
38+
M 31 905 Abd-al-Rahman Al Sufi
39+
M 32 1749 Guillaume Legentil
40+
M 33 1764 Charles Messier
41+
M 34 1654 Giovanni Batista Hodierna
42+
M 35 1745-1746 Philippe Loys de Chéseaux
43+
M 36 1654 Giovanni Batista Hodierna
44+
M 37 1654 Giovanni Batista Hodierna
45+
M 38 1654 Giovanni Batista Hodierna
46+
M 39 1764 Charles Messier
47+
M 40 1764 Charles Messier
48+
M 41 -325 Aristoteles
49+
M 42 1611 Johann Baptist Cysatus
50+
M 43 1731 Jean-Jacques Dortous de Mairan
51+
M 44 -260 Aratos of Soli
52+
M 45 -750 Homer
53+
M 46 1771 Charles Messier
54+
M 47 1654 Giovanni Batista Hodierna
55+
M 48 1771 Charles Messier
56+
M 49 1771 Charles Messier
57+
M 50 1711 Giovanni Cassini
58+
M 51 1773 Charles Messier
59+
M 52 1774 Charles Messier
60+
M 53 1775 Johann Elert Bode
61+
M 54 1778 Charles Messier
62+
M 55 1752 Nicholas Louis de Lacaille
63+
M 56 1779 Charles Messier
64+
M 57 1779 Charles Messier
65+
M 58 1779 Charles Messier
66+
M 59 1779 Johann Gottfried Koehler
67+
M 60 1779 Johann Gottfried Koehler
68+
M 61 1779 Barnabus Oriani
69+
M 62 1771 Charles Messier
70+
M 63 1779 Pierre Méchain
71+
M 64 1779 Edward Pigott
72+
M 65 1780 Charles Messier
73+
M 66 1780 Charles Messier
74+
M 67 1779 Johann Gottfried Koehler
75+
M 68 1780 Charles Messier
76+
M 69 1780 Charles Messier
77+
M 70 1780 Charles Messier
78+
M 71 1745-1746 Philippe Loys de Chéseaux
79+
M 72 1780 Pierre Méchain
80+
M 73 1780 Charles Messier
81+
M 74 1780 Pierre Méchain
82+
M 75 1780 Pierre Méchain
83+
M 76 1780 Pierre Méchain
84+
M 77 1780 Pierre Méchain
85+
M 78 1780 Pierre Méchain
86+
M 79 1780 Pierre Méchain
87+
M 80 1781 Charles Messier
88+
M 81 1774 Johann Elert Bode
89+
M 82 1774 Johann Elert Bode
90+
M 83 1752 Nicholas Louis de Lacaille
91+
M 84 1781 Charles Messier
92+
M 85 1781 Pierre Méchain
93+
M 86 1781 Charles Messier
94+
M 87 1781 Charles Messier
95+
M 88 1781 Charles Messier
96+
M 89 1781 Charles Messier
97+
M 90 1781 Charles Messier
98+
M 91 1781 Charles Messier
99+
M 92 1777 Johann Elert Bode
100+
M 93 1781 Charles Messier
101+
M 94 1781 Pierre Méchain
102+
M 95 1781 Pierre Méchain
103+
M 96 1781 Pierre Méchain
104+
M 97 1781 Pierre Méchain
105+
M 98 1781 Pierre Méchain
106+
M 99 1781 Pierre Méchain
107+
M 100 1781 Pierre Méchain
108+
M 101 1781 Pierre Méchain
109+
M 102 1781 Pierre Méchain, Charles Messier
110+
M 103 1781 Pierre Méchain
111+
M 104 1781 Pierre Méchain
112+
M 105 1781 Pierre Méchain
113+
M 106 1781 Pierre Méchain
114+
M 107 1782 Pierre Méchain
115+
M 108 1781 Pierre Méchain
116+
M 109 1781 Charles Messier
117+
M 110 1773 Charles Messier

src/core/modules/Nebula.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,8 @@ Nebula::Nebula()
151151
, VdBH_nb("")
152152
, withoutID(false)
153153
, nameI18("")
154+
, discoverer("")
155+
, discoveryYear("")
154156
, mTypeString()
155157
, bMag(99.)
156158
, vMag(99.)
@@ -429,6 +431,8 @@ QString Nebula::getInfoString(const StelCore *core, const InfoStringGroup& flags
429431

430432
oss << QString("%1: %2 %3").arg(q_("Parallax"), px, qc_("mas", "parallax")) << "<br />";
431433
}
434+
if (!discoverer.isEmpty())
435+
oss << QString("%1: %2 (%3)").arg(q_("Discoverer"), discoverer, discoveryYear) << "<br />";
432436
if (!getMorphologicalTypeDescription().isEmpty())
433437
oss << QString("%1: %2.").arg(q_("Morphological description"), getMorphologicalTypeDescription()) << "<br />";
434438
}

src/core/modules/Nebula.hpp

Lines changed: 51 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,7 @@ friend class NebulaMgr;
222222
float getSurfaceArea(void) const;
223223

224224
void setProperName(QString name) { englishName = name; }
225+
void setDiscoveryData(QString name, QString year) { discoverer = name; discoveryYear = year; }
225226
void addNameAlias(QString name) { englishAliases.append(name); englishAliases.removeDuplicates(); }
226227
void removeAllNames() { englishName=""; englishAliases.clear(); }
227228

@@ -268,54 +269,56 @@ friend class NebulaMgr;
268269
QString getMorphologicalTypeDescription() const;
269270

270271
unsigned int DSO_nb;
271-
unsigned int M_nb; // Messier Catalog number
272-
unsigned int NGC_nb; // New General Catalog number
273-
unsigned int IC_nb; // Index Catalog number
274-
unsigned int C_nb; // Caldwell Catalog number
275-
unsigned int B_nb; // Barnard Catalog number (Dark Nebulae)
276-
unsigned int Sh2_nb; // Sharpless Catalog number (Catalogue of HII Regions (Sharpless, 1959))
277-
unsigned int VdB_nb; // van den Bergh Catalog number (Catalogue of Reflection Nebulae (van den Bergh, 1966))
278-
unsigned int RCW_nb; // RCW Catalog number (H-α emission regions in Southern Milky Way (Rodgers+, 1960))
279-
unsigned int LDN_nb; // LDN Catalog number (Lynds' Catalogue of Dark Nebulae (Lynds, 1962))
280-
unsigned int LBN_nb; // LBN Catalog number (Lynds' Catalogue of Bright Nebulae (Lynds, 1965))
281-
unsigned int Cr_nb; // Collinder Catalog number
282-
unsigned int Mel_nb; // Melotte Catalog number
283-
unsigned int PGC_nb; // PGC number (Catalog of galaxies)
284-
unsigned int UGC_nb; // UGC number (The Uppsala General Catalogue of Galaxies)
285-
unsigned int Arp_nb; // Arp number (Atlas of Peculiar Galaxies (Arp, 1966))
286-
unsigned int VV_nb; // VV number (The Catalogue of Interacting Galaxies (Vorontsov-Velyaminov+, 2001))
287-
unsigned int DWB_nb; // DWB number (Catalogue and distances of optically visible H II regions (Dickel+, 1969))
288-
unsigned int Tr_nb; // Tr number (Trumpler Catalogue)
289-
unsigned int St_nb; // St number (Stock Catalogue)
290-
unsigned int Ru_nb; // Ru number (Ruprecht Catalogue)
291-
unsigned int VdBHa_nb; // vdB-Ha number (van den Bergh-Hagen Catalogue)
292-
QString Ced_nb; // Ced number (Cederblad Catalog of bright diffuse Galactic nebulae)
293-
QString PK_nb; // PK number (Catalogue of Galactic Planetary Nebulae)
294-
QString PNG_nb; // PN G number (Strasbourg-ESO Catalogue of Galactic Planetary Nebulae (Acker+, 1992))
295-
QString SNRG_nb; // SNR G number (A catalogue of Galactic supernova remnants (Green, 2014))
296-
QString ACO_nb; // ACO number (Rich Clusters of Galaxies (Abell+, 1989))
297-
QString HCG_nb; // HCG number (Hickson Compact Group (Hickson, 1989))
298-
QString ESO_nb; // ESO number (ESO/Uppsala Survey of the ESO(B) Atlas (Lauberts, 1982))
299-
QString VdBH_nb; // VdBH number (Southern Stars embedded in nebulosity (van den Bergh+, 1975))
272+
unsigned int M_nb; // Messier Catalog number
273+
unsigned int NGC_nb; // New General Catalog number
274+
unsigned int IC_nb; // Index Catalog number
275+
unsigned int C_nb; // Caldwell Catalog number
276+
unsigned int B_nb; // Barnard Catalog number (Dark Nebulae)
277+
unsigned int Sh2_nb; // Sharpless Catalog number (Catalogue of HII Regions (Sharpless, 1959))
278+
unsigned int VdB_nb; // van den Bergh Catalog number (Catalogue of Reflection Nebulae (van den Bergh, 1966))
279+
unsigned int RCW_nb; // RCW Catalog number (H-α emission regions in Southern Milky Way (Rodgers+, 1960))
280+
unsigned int LDN_nb; // LDN Catalog number (Lynds' Catalogue of Dark Nebulae (Lynds, 1962))
281+
unsigned int LBN_nb; // LBN Catalog number (Lynds' Catalogue of Bright Nebulae (Lynds, 1965))
282+
unsigned int Cr_nb; // Collinder Catalog number
283+
unsigned int Mel_nb; // Melotte Catalog number
284+
unsigned int PGC_nb; // PGC number (Catalog of galaxies)
285+
unsigned int UGC_nb; // UGC number (The Uppsala General Catalogue of Galaxies)
286+
unsigned int Arp_nb; // Arp number (Atlas of Peculiar Galaxies (Arp, 1966))
287+
unsigned int VV_nb; // VV number (The Catalogue of Interacting Galaxies (Vorontsov-Velyaminov+, 2001))
288+
unsigned int DWB_nb; // DWB number (Catalogue and distances of optically visible H II regions (Dickel+, 1969))
289+
unsigned int Tr_nb; // Tr number (Trumpler Catalogue)
290+
unsigned int St_nb; // St number (Stock Catalogue)
291+
unsigned int Ru_nb; // Ru number (Ruprecht Catalogue)
292+
unsigned int VdBHa_nb; // vdB-Ha number (van den Bergh-Hagen Catalogue)
293+
QString Ced_nb; // Ced number (Cederblad Catalog of bright diffuse Galactic nebulae)
294+
QString PK_nb; // PK number (Catalogue of Galactic Planetary Nebulae)
295+
QString PNG_nb; // PN G number (Strasbourg-ESO Catalogue of Galactic Planetary Nebulae (Acker+, 1992))
296+
QString SNRG_nb; // SNR G number (A catalogue of Galactic supernova remnants (Green, 2014))
297+
QString ACO_nb; // ACO number (Rich Clusters of Galaxies (Abell+, 1989))
298+
QString HCG_nb; // HCG number (Hickson Compact Group (Hickson, 1989))
299+
QString ESO_nb; // ESO number (ESO/Uppsala Survey of the ESO(B) Atlas (Lauberts, 1982))
300+
QString VdBH_nb; // VdBH number (Southern Stars embedded in nebulosity (van den Bergh+, 1975))
300301
bool withoutID;
301-
QString englishName; // English name
302-
QStringList englishAliases; // English aliases
303-
QString nameI18; // Nebula name
304-
QStringList nameI18Aliases; // Nebula aliases
305-
QString mTypeString; // Morphological type of object (as string)
306-
float bMag; // B magnitude
307-
float vMag; // V magnitude. For Dark Nebulae, opacity is stored here.
308-
float majorAxisSize; // Major axis size in degrees
309-
float minorAxisSize; // Minor axis size in degrees
310-
int orientationAngle; // Orientation angle in degrees
311-
float oDistance; // distance (kpc)
312-
float oDistanceErr; // Error of distance (kpc)
302+
QString englishName; // English name
303+
QStringList englishAliases; // English aliases
304+
QString nameI18; // Nebula name
305+
QStringList nameI18Aliases; // Nebula aliases
306+
QString discoverer; // The name of discoverer
307+
QString discoveryYear; // Year(s) of discovery
308+
QString mTypeString; // Morphological type of object (as string)
309+
float bMag; // B magnitude
310+
float vMag; // V magnitude. For Dark Nebulae, opacity is stored here.
311+
float majorAxisSize; // Major axis size in degrees
312+
float minorAxisSize; // Minor axis size in degrees
313+
int orientationAngle; // Orientation angle in degrees
314+
float oDistance; // distance (kpc)
315+
float oDistanceErr; // Error of distance (kpc)
313316
float redshift;
314317
float redshiftErr;
315318
float parallax;
316319
float parallaxErr;
317-
Vec3d XYZ; // Cartesian equatorial position (J2000.0)
318-
Vec3d XY; // Store temporary 2D position
320+
Vec3d XYZ; // Cartesian equatorial position (J2000.0)
321+
Vec3d XY; // Store temporary 2D position
319322
NebulaType nType;
320323

321324
SphericalRegionP pointRegion;
@@ -328,13 +331,13 @@ friend class NebulaMgr;
328331
static StelTextureSP texGalaxyLarge; // Type 0_large
329332
static StelTextureSP texOpenCluster; // Type 1
330333
static StelTextureSP texOpenClusterLarge; // Type 1_large
331-
static StelTextureSP texOpenClusterXLarge; // Type 1_extralarge
334+
static StelTextureSP texOpenClusterXLarge; // Type 1_extralarge
332335
static StelTextureSP texGlobularCluster; // Type 2
333-
static StelTextureSP texGlobularClusterLarge; // Type 2_large
336+
static StelTextureSP texGlobularClusterLarge; // Type 2_large
334337
static StelTextureSP texPlanetaryNebula; // Type 3
335-
static StelTextureSP texDiffuseNebula; // Type 4
336-
static StelTextureSP texDiffuseNebulaLarge; // Type 4_large
337-
static StelTextureSP texDiffuseNebulaXLarge; // Type 4_extralarge
338+
static StelTextureSP texDiffuseNebula; // Type 4
339+
static StelTextureSP texDiffuseNebulaLarge; // Type 4_large
340+
static StelTextureSP texDiffuseNebulaXLarge; // Type 4_extralarge
338341
static StelTextureSP texDarkNebula; // Type 5
339342
static StelTextureSP texDarkNebulaLarge; // Type 5_large
340343
static StelTextureSP texOpenClusterWithNebulosity; // Type 6

src/core/modules/NebulaMgr.cpp

Lines changed: 52 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -812,11 +812,12 @@ NebulaP NebulaMgr::search(const QString& name)
812812

813813
void NebulaMgr::loadNebulaSet(const QString& setName)
814814
{
815-
QString srcCatalogPath = StelFileMgr::findFile("nebulae/" + setName + "/catalog.txt");
815+
QString srcCatalogPath = StelFileMgr::findFile("nebulae/" + setName + "/catalog.txt");
816816
QString dsoCatalogPath = StelFileMgr::findFile("nebulae/" + setName + "/catalog-" + StellariumDSOCatalogVersion + ".dat");
817817
if (dsoCatalogPath.isEmpty()) // Extended edition is not exist, let's try find standard edition
818-
dsoCatalogPath = StelFileMgr::findFile("nebulae/" + setName + "/catalog.dat");
818+
dsoCatalogPath = StelFileMgr::findFile("nebulae/" + setName + "/catalog.dat");
819819
QString dsoOutlinesPath = StelFileMgr::findFile("nebulae/" + setName + "/outlines.dat");
820+
QString dsoDiscoveryPath = StelFileMgr::findFile("nebulae/" + setName + "/discovery.dat");
820821

821822
dsoArray.clear();
822823
dsoIndex.clear();
@@ -840,6 +841,9 @@ void NebulaMgr::loadNebulaSet(const QString& setName)
840841

841842
if (!dsoOutlinesPath.isEmpty())
842843
loadDSOOutlines(dsoOutlinesPath);
844+
845+
if (!dsoDiscoveryPath.isEmpty())
846+
loadDSODiscoveryData(dsoDiscoveryPath);
843847
}
844848

845849
// Look for a nebula by XYZ coords
@@ -1478,15 +1482,13 @@ bool NebulaMgr::loadDSONames(const QString &filename)
14781482
QStringList nodata;
14791483
nodata.clear();
14801484
int totalRecords=0;
1481-
int lineNumber=0;
14821485
int readOk=0;
14831486
unsigned int nb;
14841487
NebulaP e;
14851488
static const QRegularExpression commentRx("^(\\s*#.*|\\s*)$");
14861489
while (!dsoNameFile.atEnd())
14871490
{
14881491
record = QString::fromUtf8(dsoNameFile.readLine());
1489-
lineNumber++;
14901492
if (commentRx.match(record).hasMatch())
14911493
continue;
14921494

@@ -1628,6 +1630,52 @@ bool NebulaMgr::loadDSONames(const QString &filename)
16281630
return true;
16291631
}
16301632

1633+
bool NebulaMgr::loadDSODiscoveryData(const QString &filename)
1634+
{
1635+
qDebug() << "Loading DSO discovery data ...";
1636+
QFile dsoDiscoveryFile(filename);
1637+
if (!dsoDiscoveryFile.open(QIODevice::ReadOnly | QIODevice::Text))
1638+
{
1639+
qWarning().noquote() << "DSO discovery data file" << QDir::toNativeSeparators(filename) << "not found.";
1640+
return false;
1641+
}
1642+
1643+
int readOk = 0;
1644+
int totalRecords = 0;
1645+
QString record, dso, dYear, dName;
1646+
NebulaP e;
1647+
while (!dsoDiscoveryFile.atEnd())
1648+
{
1649+
record = QString::fromUtf8(dsoDiscoveryFile.readLine());
1650+
if (record.startsWith("//") || record.startsWith("#") || record.isEmpty())
1651+
continue;
1652+
1653+
totalRecords++;
1654+
#if (QT_VERSION>=QT_VERSION_CHECK(5, 14, 0))
1655+
QStringList list=record.split("\t", Qt::KeepEmptyParts);
1656+
#else
1657+
QStringList list=record.split("\t", QString::KeepEmptyParts);
1658+
#endif
1659+
1660+
dso = list.at(0).trimmed();
1661+
dYear = list.at(1).trimmed();
1662+
dName = list.at(2).trimmed();
1663+
1664+
e = search(dso);
1665+
if (e.isNull()) // maybe this is inner number of DSO
1666+
e = searchDSO(dso.toUInt());
1667+
1668+
if (!e.isNull())
1669+
{
1670+
e->setDiscoveryData(dName, dYear);
1671+
readOk++;
1672+
}
1673+
}
1674+
dsoDiscoveryFile.close();
1675+
qDebug().noquote() << "Loaded" << readOk << "/" << totalRecords << "DSO discovery records successfully";
1676+
return true;
1677+
}
1678+
16311679
bool NebulaMgr::loadDSOOutlines(const QString &filename)
16321680
{
16331681
qDebug() << "Loading DSO outline data ...";

src/core/modules/NebulaMgr.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1003,6 +1003,9 @@ private slots:
10031003
bool loadDSONames(const QString& filename);
10041004
// Load outlines for DSO
10051005
bool loadDSOOutlines(const QString& filename);
1006+
// Load discovery data for DSO
1007+
// TODO: Move these data into main DSO catalog to fast reading (v4)
1008+
bool loadDSODiscoveryData(const QString& filename);
10061009

10071010
QVector<NebulaP> dsoArray; // The DSO list
10081011
QHash<unsigned int, NebulaP> dsoIndex;

0 commit comments

Comments
 (0)