[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: ATM OT : correspondence NGC - Uranometria chart n°
I wrote on the 2nd of February
"Is there somewhere on the web where I can find a correspondence list
between
NGC (or even more) and Uranometria chart n°
A very simple one is enought, like:
N°NGC Uranometria chart n°
NGC 1 225 (this number is a false example!)
NGC 2 125
etc
Thank you for your help on this OT answer."
I finally found a web site with an excel file with all coordonates of NGC
and IC object: http://www.astrosurf.com/lombry/download.htm
I took the program in sky and telescope
http://www.skypub.com/resources/software/basic/programs/chart.bas
(thank you Bob Bond) and adjust it to excel (in visual basic). I've also
included new features: the place on the chart where is located the object to
find : page L or R, and in the page if it is in NW, NE, SE or SW, and the n°
of chart of the new (oct 2001) edition Uranometria.
So to have the n° of chart of sky atlas 2000, Urano "first" and latest
édition, you have to:
1) dowload the excel file in
2) in Excel (mine is office 97), in menu outil/macro select visual basic
editor (don't know the english menu of the french excel "outils": maybe
tools ?)
3) in the visual basic window, in menu "insertion" select module
4) paste the code below
5) close visual basic
6) in Excel, in menu outil/macro select macro then select Ncarte and
execute it
the macro will take approximately 1 minute to write in the AJ, AK, AL the n°
of the chart for each of the 14000 object in the sheet.
Sub NCarte()
Dim RA, Decl, MidDecl, TestOrientation, AjoutHemSud As Single
Dim ligne As Object
Dim NSkyAtlas, NUranoV1, NuranoV2 As Variant
Dim OrientSA, OrientU1, OrientU2 As String
'
' mise en place des titres de colonnes
'
Range("AJ2").Select
ActiveCell.FormulaR1C1 = "Sky atlas 2000"
Range("AK2").Select
ActiveCell.FormulaR1C1 = "1er edition Uranometria"
Range("AL2").Select
ActiveCell.FormulaR1C1 = "2e edition Uranometria"
Range("AJ2:AL2").Select
With Selection
.WrapText = True
End With
Columns("AJ:AL").Select
Range("AJ2").Activate
Selection.ColumnWidth = 12
Range("AJ2").Select
'
'pour toutes les lignes de la région courante en ayant descendu de 2 lignes
For Each ligne In Range("A3").CurrentRegion.Offset(2, 0).Rows
'teste si on est pas sur une ligne sans coordonnées
If ligne.Cells(1, 6).Value + ligne.Cells(1, 8).Value + ligne.Cells(1,
10).Value = 0 Then
GoTo 10
End If
'variable de position dans la carte NE, SE, NO ou SO à réinitialiser
OrientSA = ""
OrientU1 = ""
OrientU2 = ""
'calcul de RA
RA = ligne.Cells(1, 6).Value + ligne.Cells(1, 8).Value / 60 + ligne.Cells(1,
10).Value / 3600
'calcul de decl
If ligne.Cells(1, 12).Value >= 0 Then
Decl = ligne.Cells(1, 12).Value + ligne.Cells(1, 14).Value / 60 +
ligne.Cells(1, 16).Value / 3600
Else
Decl = ligne.Cells(1, 12).Value - ligne.Cells(1, 14).Value / 60 -
ligne.Cells(1, 16).Value / 3600
End If '
' N° carte skyatlas 2000
Call skyatlas(ligne, RA, Decl)
' N° carte Uranometria 1ere édition (avant nov 2001)
Call Urano1erEd(ligne, RA, Decl)
' N° carte Uranometria 2eme édition (après nov 2001)
Call Urano2emeEd(ligne, RA, Decl)
10 Next ligne
End Sub
Sub skyatlas(ligne, RA, Decl)
'
' N° carte skyatlas 2000
'
'
Select Case Abs(Decl)
Case 0 To 20
NSkyAtlas = 9 + Int((RA + 2.5) / 3)
If NSkyAtlas = 9 Then NSkyAtlas = 17
'détermination de l'orientation N/S pour l'hemisphere N.
'on renversera après pour hémis. sud
If Abs(Decl) > 0 Then OrientSA = "N" Else OrientSA = "S"
'
If Decl < 0 Then
If OrientSA = "N" Then OrientSA = "S" Else OrientSA = "N"
End If
'
' puis de quel coté de la page g/d et dans ce coté quel orientation
O/E
Call orientationEO(OrientSA, (RA + 2.5) / 3 - Int((RA + 2.5) / 3))
'
Case 20.001 To 50
NSkyAtlas = 4 + Int(RA / 4)
If Decl < 0 Then NSkyAtlas = NSkyAtlas + 14
'détermination de l'orientation N/S pour l'hemisphere N.
'on renversera après pour hémis. sud
If Abs(Decl) > 35 Then OrientSA = "N" Else OrientSA = "S"
'
If Decl < 0 Then
If OrientSA = "N" Then OrientSA = "S" Else OrientSA = "N"
End If
'
' puis de quel coté de la page g/d et dans ce coté quel orientation
O/E
Call orientationEO(OrientSA, RA / 4 - Int(RA / 4))
Case Else '50 à 90
NSkyAtlas = 1 + Int(RA / 8)
If Decl < 0 Then NSkyAtlas = NSkyAtlas + 23
'détermination de l'orientation N/S pour l'hemisphere N.
'on renversera après pour hémis. sud
If Abs(Decl) > 70 Then OrientSA = "N" Else OrientSA = "S"
'
If Decl < 0 Then
If OrientSA = "N" Then OrientSA = "S" Else OrientSA = "N"
End If
'
' puis de quel coté de la page g/d et dans ce coté quel orientation
O/E
Call orientationEO(OrientSA, RA / 8 - Int(RA / 8))
End Select
ligne.Cells(1, 36).Value = NSkyAtlas & OrientSA
End Sub
Sub Urano1erEd(ligne, RA, Decl)
'
'
' N° carte Uranometria 1ere édition (avant nov 2001)
'
'
Select Case Abs(Decl)
Case 0 To 5.5
'NUranoV1 = 215 + Int((RA + 16 / 60) * 60 / 32) simplifié en
NUranoV1 = 215 + Int(RA * 1.875 + 0.5)
If NUranoV1 = 260 Then NUranoV1 = 215
'détermination de la partie de la carte ou se situe l'objet:
'orientation N/S
If Decl > 0 Then OrientU1 = "N" Else OrientU1 = "S"
' puis O/E
If RA * 1.875 + 0.5 - Int(RA * 1.875 + 0.5) > 0.5 Then
OrientU1 = OrientU1 & "W"
Else
OrientU1 = OrientU1 & "E"
End If
Case 5.5001 To 17
'NUranoV1 = 170 + Int((RA + 16 / 60) * 60 / 32) simplifié en
NUranoV1 = 170 + Int(RA * 1.875 + 0.5)
If NUranoV1 = 215 Then NUranoV1 = 170
'
'détermination de l'orientation N/S pour l'hemisphere N.
Call orientationNS(Decl, 11.25, NUranoV1, 90, OrientU1)
'détermination de l'orientation E/O
If RA * 1.875 + 0.5 - Int(RA * 1.875 + 0.5) > 0.5 Then
OrientU1 = OrientU1 & "W"
Else
OrientU1 = OrientU1 & "E"
End If
Case 17.0001 To 28
'NUranoV1 = 125 + Int((RA + 16 / 60) * 60 / 32) simplifié en
NUranoV1 = 125 + Int(RA * 1.875 + 0.5)
If NUranoV1 = 170 Then NUranoV1 = 125
'
'détermination de l'orientation N/S pour l'hemisphere N.
Call orientationNS(Decl, 22.5, NUranoV1, 180, OrientU1)
'détermination de l'orientation E/O
'
If RA * 1.875 + 0.5 - Int(RA * 1.875 + 0.5) > 0.5 Then
OrientU1 = OrientU1 & "W"
Else
OrientU1 = OrientU1 & "E"
End If
Case 28.0001 To 39
' NUranoV1 = 89 + Int((RA + 20 / 60) * 60 / 40) simplifié en
NUranoV1 = 89 + Int(RA * 1.5 + 0.5)
If NUranoV1 = 125 Then NUranoV1 = 89
'
'détermination de l'orientation N/S pour l'hemisphere N.
Call orientationNS(Decl, 33.5, NUranoV1, 261, OrientU1)
'détermination de l'orientation E/O
'
If RA * 1.5 + 0.5 - Int(RA * 1.5 + 0.5) > 0.5 Then
OrientU1 = OrientU1 & "W"
Else
OrientU1 = OrientU1 & "E"
End If
Case 39.0001 To 50
' NUranoV1 = 59 + Int((RA + 24 / 60) * 60 / 48) simplifié en
NUranoV1 = 59 + Int(RA / 0.8 + 0.5)
If NUranoV1 = 89 Then NUranoV1 = 59
'
'détermination de l'orientation N/S pour l'hemisphere N.
Call orientationNS(Decl, 44.5, NUranoV1, 327, OrientU1)
'détermination de l'orientation E/O
'
If RA / 0.8 + 0.5 - Int(RA / 0.8 + 0.5) > 0.5 Then
OrientU1 = OrientU1 & "W"
Else
OrientU1 = OrientU1 & "E"
End If
Case 50.0001 To 61
' NUranoV1 = 35 + Int((RA + 30 / 60) * 60 / 60) simplifié en
NUranoV1 = 35 + Int(RA + 0.5)
If NUranoV1 = 59 Then NUranoV1 = 35
'
'détermination de l'orientation N/S pour l'hemisphere N.
'on renversera après pour hémis. sud
Call orientationNS(Decl, 55.5, NUranoV1, 381, OrientU1)
'détermination de l'orientation E/O
'
If RA + 0.5 - Int(RA + 0.5) > 0.5 Then
OrientU1 = OrientU1 & "W"
Else
OrientU1 = OrientU1 & "E"
End If
Case 61.0001 To 72.5
'NUranoV1 = 15 + Int((RA + 36 / 60) * 60 / 72) simplifié en
NUranoV1 = 15 + Int(RA / 1.2 + 0.5)
If NUranoV1 = 35 Then NUranoV1 = 15
'
'détermination de l'orientation N/S pour l'hemisphere N.
Call orientationNS(Decl, 66.75, NUranoV1, 425, OrientU1)
'détermination de l'orientation E/O
'
If RA / 1.2 + 0.5 - Int(RA / 1.2 + 0.5) > 0.5 Then
OrientU1 = OrientU1 & "W"
Else
OrientU1 = OrientU1 & "E"
End If
Case 72.5001 To 84.5
'NUranoV1 = 3 + Int((RA + 50 / 60) * 60 / 120) simplifié en
NUranoV1 = 3 + Int(RA / 2 + 1 / 2.4)
If NUranoV1 = 15 Then NUranoV1 = 3
'
'détermination de l'orientation N/S pour l'hemisphere N.
Call orientationNS(Decl, 78.5, NUranoV1, 457, OrientU1)
'détermination de l'orientation E/O
'
If RA / 2 + 1 / 2.4 - Int(RA / 2 + 1 / 2.4) > 0.5 Then
OrientU1 = OrientU1 & "W"
Else
OrientU1 = OrientU1 & "E"
End If
Case 84.50001 To 90
NUranoV1 = 1 + Int(RA / 12)
'
If RA > 6 And RA < 18 Then OrientU1 = "S" Else OrientU1 = "N"
If Decl < 0 Then
NUranoV1 = 474 - NUranoV1
If OrientU1 = "N" Then OrientU1 = "S" Else OrientU1 = "N"
End If
'
If RA > 0 And RA < 12 Then
OrientU1 = OrientU1 & "W"
Else
OrientU1 = OrientU1 & "E"
End If
'
Case Else
MsgBox "Ascension droite >90° pour ligne" & ligne.Row & "!!!"
NUranoV1 = "prob: Ascension droite >90°"
End Select
'
' test du n° de vol puis affichage
'
If Decl > 5.5 Then
NUranoV1 = "Vol I,n°" & NUranoV1 & "; " & OrientU1
ElseIf Decl < -5.5 Then
NUranoV1 = "Vol II,n°" & NUranoV1 & "; " & OrientU1
Else
NUranoV1 = "Vol I&II,n°" & NUranoV1 & "; " & OrientU1
End If
ligne.Cells(1, 37).Value = NUranoV1
End Sub
Sub Urano2emeEd(ligne, RA, Decl)
'
'
' N° carte Uranometria 2ème édition (après nov 2001)
'
'
Select Case Abs(Decl)
Case 0 To 5.5
'NUranoV2 = 121 - Int((RA + 36/ 60) * 60 / 72) simplifié en
NuranoV2 = 121 - Int(RA / 1.2 + 0.5)
'si on est sur la partie droite de la première carte 101, on tombe
sur 121...
If NuranoV2 = 121 Then NuranoV2 = 101
'
'détermination de la partie de la carte ou se situe l'objet:
'orientation N/S
If Decl > 0 Then OrientU2 = "N" Else OrientU2 = "S"
' puis de quel coté de la page g/d et dans ce coté quel orientation
O/E
Call orientationEO(OrientU2, RA / 1.2 + 0.5 - Int(RA / 1.2 + 0.5))
Case 5.5001 To 17.5
'NUranoV2 = 101 - Int((RA + 36 / 60) * 60 / 72) simplifié en
NuranoV2 = 101 - Int(RA / 1.2 + 0.5)
'
If NuranoV2 = 101 Then NuranoV2 = 81
'détermination de l'orientation N/S pour l'hemisphere N.
Call orientationNS(Decl, 11.5, NuranoV2, 40, OrientU2)
' puis de quel coté de la page g/d et dans ce coté quel orientation
O/E
Call orientationEO(OrientU2, RA / 1.2 + 0.5 - Int(RA / 1.2 + 0.5))
'
Case 17.5001 To 29.5
'NUranoV2 = 81 - Int((RA + 40 / 60) * 60 / 80) simplifié en
NuranoV2 = 81 - Int(RA * 0.75 + 0.5)
If NuranoV2 = 81 Then NuranoV2 = 63
'détermination de l'orientation N/S pour l'hemisphere N.
Call orientationNS(Decl, 23.5, NuranoV2, 78, OrientU2)
' puis de quel coté de la page g/d et dans ce coté quel orientation
O/E
Call orientationEO(OrientU2, RA * 0.75 + 0.5 - Int(RA * 0.75 + 0.5))
'
'
Case 29.50001 To 40.5
' NUranoV2 = 63 - Int((RA + 40 / 60) * 60 / 80) simplifié en
NuranoV2 = 63 - Int(RA * 0.75 + 0.5)
If NuranoV2 = 63 Then NuranoV2 = 45
'détermination de l'orientation N/S pour l'hemisphere N.
Call orientationNS(Decl, 35, NuranoV2, 114, OrientU2)
' puis de quel coté de la page g/d et dans ce coté quel orientation
O/E
Call orientationEO(OrientU2, RA * 0.75 + 0.5 - Int(RA * 0.75 + 0.5))
Case 40.5001 To 51.5
' NUranoV2 = 45- Int((RA + 48 / 60) * 60 / 96) simplifié en
NuranoV2 = 45 - Int(RA / 1.6 + 0.5)
If NuranoV2 = 45 Then NuranoV2 = 30
'détermination de l'orientation N/S pour l'hemisphere N.
Call orientationNS(Decl, 46, NuranoV2, 147, OrientU2)
' puis de quel coté de la page g/d et dans ce coté quel orientation
O/E
Call orientationEO(OrientU2, RA / 1.6 + 0.5 - Int(RA / 1.6 + 0.5))
'
'
Case 51.5001 To 62.5
' NUranoV2 = 30 - Int((RA + 60 / 60) * 60 / 120) simplifié en
NuranoV2 = 30 - Int(RA / 2 + 0.5)
If NuranoV2 = 30 Then NuranoV2 = 18
'détermination de l'orientation N/S pour l'hemisphere N.
Call orientationNS(Decl, 57, NuranoV2, 174, OrientU2)
' puis de quel coté de la page g/d et dans ce coté quel orientation
O/E
Call orientationEO(OrientU2, RA / 2 + 0.5 - Int(RA / 2 + 0.5))
'
Case 62.50001 To 73.5
' NUranoV2 = 18 - Int((RA + 72 / 60) * 60 / 144) simplifié en
NuranoV2 = 18 - Int(RA / 2.4 + 0.5)
If NuranoV2 = 18 Then NuranoV2 = 8
'détermination de l'orientation N/S pour l'hemisphere N.
Call orientationNS(Decl, 68, NuranoV2, 196, OrientU2)
' puis de quel coté de la page g/d et dans ce coté quel orientation
O/E
Call orientationEO(OrientU2, RA / 2.4 + 0.5 - Int(RA / 2.4 + 0.5))
'
'
Case 73.5001 To 84.5
' NUranoV2 = 8 - Int((RA + 120 / 60) * 60 / 240) simplifié en
NuranoV2 = 8 - Int(RA / 4 + 0.5)
If NuranoV2 = 8 Then NuranoV2 = 2
'détermination de l'orientation N/S pour l'hemisphere N.
Call orientationNS(Decl, 79, NuranoV2, 212, OrientU2)
' puis de quel coté de la page g/d et dans ce coté quel orientation
O/E
Call orientationEO(OrientU2, RA / 4 + 0.5 - Int(RA / 4 + 0.5))
'
'
Case 84.50001 To 90
NuranoV2 = 1
If RA > 6 And RA < 18 Then OrientU2 = "N" Else OrientU2 = "S"
If Decl < 0 Then
NuranoV2 = 220
If OrientU2 = "N" Then OrientU2 = "S" Else OrientU2 = "N"
End If
'
If RA > 0 And RA < 12 Then
OrientU2 = ",G," & OrientU2 & "W"
Else
OrientU2 = ",D," & OrientU2 & "E"
End If
'
Case Else
MsgBox "Ascension droite >90° pour ligne" & ligne.Row & "!!!"
NuranoV2 = "prob: Ascension droite >90°"
End Select
'
' test du n° de volume puis affichage
'
If Decl > -5.5 Then
NuranoV2 = "Vol I,n°" & NuranoV2 & OrientU2
Else
NuranoV2 = "Vol II,n°" & NuranoV2 & OrientU2
End If
ligne.Cells(1, 38).Value = NuranoV2
End Sub
Sub orientationNS(Decl, MidDecl, Nurano, AjoutHemSud, Orient)
'détermination de l'orientation N/S pour l'hemisphere N.
'on renversera après pour hémis. sud
If Abs(Decl) > MidDecl Then Orient = "N" Else Orient = "S"
'
If Decl < 0 Then
Nurano = Nurano + AjoutHemSud
If Orient = "N" Then Orient = "S" Else Orient = "N"
End If
End Sub
Sub orientationEO(Orient, TestOrientation)
' puis de quel coté de la page g/d et dans ce coté quel orientation
O/E
Select Case TestOrientation
Case 0 To 0.25
Orient = ",R," & Orient & "E"
Case 0.25 To 0.5
Orient = ",R," & Orient & "W"
Case 0.5 To 0.75
Orient = ",L," & Orient & "E"
Case 0.75 To 1
Orient = ",L," & Orient & "W"
End Select
End Sub