Herramientas de usuario

Herramientas del sitio


es:documentation:catgen

¡Esta es una revisión vieja del documento!


FIXME This page is not fully translated, yet. Please help completing the translation.
(remove this paragraph once the translation is finished)

CATGEN

Desde el menú: Ajustes → Catálogo, luego en el cuadro de diálogo elige la pestaña Catálogo, y click en el botón CatGen.

Puedes descargar miles de catálogos en forma de archivos de texto con datos de todo tipo de objeto celeste en el sitio del CDS o en el ADC, así como de otras fuentes. Cada uno contiene la información sobre algunas decenas y hasta millones de objetos.

El propósito de esta herramienta es la conversión de catálogos de texto en archivos que SkyCharts pueda usar de manera más eficiente.

Debido a la gran cantidad de datos disponibles sería imposible una elección que satisfaga todas las necesidades. Si tienes un interés particular, puedes usar CatGen para construir tu propia colección de catálogos a partir de los datos originales provistos profesionalmente. Además, podrás usar cualquier catálogo nuevo apenas se lo publique, sin demoras. Para un desempeño adecuado de tu nuevo catálogo en SkyCharts, puedes usar CatGen para convertir el catálogo original en formato texto a un catálogo binario.

En general los catálogos están formateados como texto simple. Cada línea (llamada registro) contiene los datos de un objeto individual. Los datos de cada línea consisten de piezas de información (llamadas campos). Éstos contienen el identificador del objeto así como sus propiedades. El contenido de cada campo de datos para cada registro está definido por la columna donde comienza y su ancho. Por ejemplo, consideremos el siguiente

 1          BD+44 4550      3 36042          46           000001.1+444022000509.9+451345114.44
 2          BD-01 4525      6128569                       235956.2-010330000503.8-003011 98.33
 3 33    PscBD-06 6357     281285721002I         Var?     000013.0-061601000520.1-054227 93.75
 4 86    PegBD+12 5063     87 917012004                   000033.8+125023000542.0+132346106.19

En ciertas posiciones fijas encontramos cierto tipo de información. En general un archivo que acompaña al catálogo (Readme) describe el formato con todo detalle. La información correspondiente a este ejemplo está aquí .

Byte-by-byte Description of file: catalog.dat
--------------------------------------------------------------------------------
   Bytes Format  Units     Label      Explanations
--------------------------------------------------------------------------------
   1-  4  I4     ---       HR         [1/9110]+ Harvard Revised Number = Bright Star Number
   5- 14  A10    ---       Name       Name, generally Bayer and/or Flamsteed name
  15- 25  A11    ---       DM         Durchmusterung Identification (zone in bytes 17-19)
  26- 31  I6     ---       HD         [1/225300]? Henry Draper Catalog Number

Es importante familiarizarse con el formato de texto del catálogo antes de convertirlo con CatGen. Hay todo tipo de detalles a los cuales prestar atención: unidades, rango de valores (entre corchetes), formatos numéricos, identificadores, formato de coordenadas y épocas. Un signo de interrogación en las Explanations indica que el dato no está siempre presente; revisa el catálogo para ver qué tan frecuente es ésto. Asegúrate de leer las notas, si las hubiere. Conviene utilizar un editor de textos capaz de manejar archivos muy grandes (por ejemplo Notepad++).

Si los datos sólo están disponibles en otro formato, en general es sencillo escribir un programa que pueda extraerlos y formatearlos adecuadamente. Puede hacerse con un lenguaje de scripts como Perl. Para trabajar con archivos CSV (en los cuales los campos están separados por comas) puedes usar CSVed, que es muy bueno, o el Calc que se incluye con OpenOffice.

Necesitas seleccionar qué datos incluir en el catálogo. Para cada tipo de catálogo existe un mínimo de información necesaria para representar el objeto en la carta. Puedes agregar información adicional, que será accesible al clickear en el objeto.

Recuerda que cuanta más información incluyaas en el catálogo, más espacio ocupará en el disco de tu computadora. No siempre conviene incluir toda la información disponible en el catálogo original; tómate un tiempo para decidir la que realmente necesitas. También puedes preparar dos versiones del catálogo: una completa para tu computadora de escritorio, y una más compacta con la información mínima para tu cmputadora móvil.

Estructura de CATGEN

CATGEN tiene cuatro pasos, cada uno en una página:

  • Página 1 Selecciona el archivo de entrada, dale un nombre al catálogo, y establece el tipo de catálogo.
  • Página 2 Establece los parámetros generales de acuerdo al tipo de catálogo.
  • Página 3 Define los campos a ser leídos desde el archivo de entrada que serán incluidos en el catálogo.
  • Página 4 Establece las opciones de salida y construye el catálogo.

En cada paso puedes salvar el proyecto como un archivo “.prj”. Este archivo contiene todos los ajustes que hiciste en CatGen, y que determinan la conversión del catálogo. Así, puedes interrumpir la preparación del catálogo y continuarla más tarde, cargando el archivo .prj correspondiente.
Los dos botones al pie de cada página de CatGen conrolan esta facilidad:

  • Guardar proy. permite crear (si no existiera) el archivo “xxx.prj” (xxx = nombre del catálogo).
  • Cargar proy. restablece un archivo “.prj” de tu elección.

Página 1

En la primera página debes indicar el Tipo de catálogo. Ésto activa opciones específicas en las siguientes páginas.

El Nombre corto del catálogo se usa para identificar el catálogo. Será prefijado al nombre del objeto en las cartas. Debe tener uno a cuatro caracteres.

El Nombre completo del catálogo es su identificador completo.

Click en el botón Abrir para seleccionar el archivo de texto del catálogo. Los catálogos grandes en general están partidos en muchos archivos pequeños. En tal caso seleciónalos todos; el orden no interesa.

Elije Tipo de catálogo de salida. Con SkyChart V3 puedes elegir un formato de texto para catálogos pequeños. En este caso no se escribe más que un archivo de descripción que permite al programa acceder a los archivos de texto. Así, puedes editar directamente el catálogo paa hacer un cambio menor, sin necesidade de corred CatGen de nuevo.

Si seleccionas “Catálogo de archivo de texto” tienes también la opción de especificar una dirección web en “Update URL” que apunte a la última versión del archivo en la Internet. De esta manera accederás mediante un simple click a la versión más reciente en la configuración del catálogo.

Click el botón Sig. » para pasar a la segunda página.


Página 2

Selecciona el formato de las coordenadas:

  • Opciones AR Horas, minutos, segundos u Horas decimales o Grados, minutos, segundos o Grados decimales.
  • Opciones DEC Grados, minutes, seconds or Grados decimales o Distancia decimal al Polo Sur.

Equinoccio de las coordenadas es la época de las coordenadas relativa a la precesión. Usa 2000 para ICRS.
Época de posición es la época por defecto para el movimiento propio. Esta fecha puede ser cambiada para cada objeto más adelante, en el archivo de datos.
Magnitud máxima es la magnitud del objeto más tenue del catálogo. Este ajuste es particularmente importante para un catálogo de estrellas, para representar correctamente las magnitudes en la carta.

La segunda parte depende del tipo de catálogo. Para estrellas está enblanco. La imagen a la derecha muestra Parámetros prefijados para contornos:

  • Drawing type (used to connect points in the list) :
    • Line: straight lines
    • Spline: spline curves
    • Surface: fill surface with line color
  • Closed contour force a closing line between the last point and the first one.
  • Line width as it says (in pixels)
  • Color of the line or surface (click on to change it)
  • Edit line operation (see below) set character strings that will be recognized for drawing operations (comma separated values). Click return when ready.
  • Edit color (see below) set character strings that will be recognized for lines color (comma separated values). Click return when ready.

Nebulae Options

  • Dimension and Units default dimensions (in case of empty fields: no data) and unit.
  • Logaritmic scale check this box if the field used for size is a flux, i.e. for a radio source catalog.
  • Edit Object Type set character strings that will be recognized to set the object type (comma separated values). Click return when ready.
  • Edit Units set character strings that will be recognized to set the unit size (comma separated values). Click return when ready.

Click the Next button to go to the third page.

Page 3

This page enables you to map the data from the input file to your catalog file. The list shows different fields, depending from the catalog type you chose in the first page.
Select each field you want to include in you catalog and define the position in the sample record.
Required fields are enclosed between square brackets “[]”, required units are between brackets “()”.

Indicate in Label the label you want to show for this field. First Char and Length describe the position of the field for each line in the input file. You can type the value here (obtained from the catalog Readme file) or mark the data in the sample record with the mouse. When you use your mouse, be sure the field length you mark will be long enough to contain the longest string of field information in the catalog file.

Field list for each catalog type:

Required fields:

Stars Variable Stars Double Stars Nebulae Nebulae Outlines
RA RA RA RA RA
DEC DEC DEC DEC DEC
Magnitude (V) Magn. comp. 1 Line operation
Separation

Fields used to draw the charts:

Stars Variable Stars Double Stars Nebulae Nebulae Outlines
Catalog ID Catalog ID Catalog ID Catalog ID Catalog ID
B-V Magnitude Max. Position angle Nebula type Line width
Proper motion RA Magnitude Min. Magnitude Line color
Proper motion DEC Magnitude code Surface brightness Drawing type
Position Epoch Largest dimension
Magnitude B Smallest dimension
Dimension unit
Position angle

Fields for information only:

Stars Variable Stars Double Stars Nebulae Nebulae Outlines
Magnitude R Period Magn. comp. 2 Radial velocity Comment
Spectral class Variable type Epoch Morphological class String..
Parallax Maxima Epoch Component name Comment Numeric..
Comment Rise Time Spectral class comp. 1 String..
String.. Spectral class Spectral class comp. 2 Numeric..
Numeric.. Comment Comment
String.. String..
Numeric.. Numeric..

At the bottom of the list you find ten strings and numeric values you can use freely for any data.
If you check Use this field name as an Alternate name the string value can be used as an alternate name for the object. This name is used in the case the main name (Catalog Id) is missing or it can be added to the index file of the catalog.

The Advanced button enables you to compute a linear transformation of the catalog data. It is active only for numeric values.
A use can be to obtain the object coordinates when these aren't directly available from the catalog.
If the catalog gives the object position in millimeters in the plate from the galaxy center (i.e. ra: 0h42m42.00s dec:+41°16'00.0“) and you know the top of the plate is at North and the plate scale is 2 seconds per millimeter.
The approximate (without plate correction) coordinates in degrees are:

DEC = 41.26667 + Xmm * (2/3600)
RA = 10.67500 - Ymm * (2/3600/cos(DEC))

Select “Decimal degree” for both RA and DEC, indicate the position in millimeters and set the “Advanced” value to:

for RA : -0.00073837 and 10.67500
for DEC : 0.00055555 and 41.26667

If the data requires some more complexe transformations you must do the transformations before running Catgen. A Perl script can solve almost any case.

Click the Next button to go to the fourth page.

Page 4

In the last page you set the options for the generated catalog.

Set the number of files as recommended depending the number of objects in the catalog, this is very important to obtain good performance.
Check the create a search index file box if you want to create a search index to search objects in this catalog by their names.
Check the Add the alternate names to the index box if you want the fields you defined as alternate names to be included in the index.
Check the Prefix the alternate names with their label box if you want to prefix the alternate names with the label you set for the corresponding field. I.e. if a column of the input file list the UGC catalog number, you can set the index value to UGC7442 instead of 7442, which can be confusing.
Choose an Output directory to save the catalog files. It is a good habit to use a separate directory for each catalog. Ususally these directories are subdirectories of [SkyCharts installation directory]/cat/
Check the Append to an existing catalog box if you want to append the data to an existing catalog of the same name in the same directory.
This is useful to create a single catalog from various sources. In this case the catalog structure must be exactly the same as the existing catalog, otherwise the data is lost, please make a backup before to try this option.

Now you're this far, save your job definition with the Save Project button, to enable the possibility of easy changes. Now you can press the Build Catalog button!



A progress box shows you the current operation. You can interrupt the process by pressing the Abort button. In such a case the catalog will not be usable.
After the build is complete, the progress box is closed. You can exit the program with the Close button.

In case a catalog file record doesn't contain a valid numeric value for a field, this object will not be included in the catalog. Those cases find their way to a file called reject.txt.

It's a good idea first to test your definitions with a limited number of records to avoid a file consisting of millions of rejected lines! You can find a Windows equivalent of the Unix commands “head”, “tail” and “grep” in a package here that will help you to extract a few lines from a large file.

If all worked well, you are now ready to use the catalog. Refer to SkyChart documentation to activate the catalog.

Notes for Linux and Mac users

Please read carefully if you plan to make a big catalog with 9537 files.

As it read lines from the input files Catgen need to randomly write the data to the 9537 output files, depending of the star coordinates. So the 9537 files need to be open at the same time.

As Linux and Mac OS are multi-user operating system there is safe-guard to avoid one user to eat all of the system resource. For a standard Linux installation for example the maximum number of file a user can open at the same time is limited to 1024.

To increase this limit you first need to change the system limit in the file limits.conf :

sudo vi /etc/security/limits.conf

add this two lines at the end of the file:

* soft nofile 1024
* hard nofile 32768

I recommend you keep the default value of 1024, this can be a good protection again a runaway process.

Save the file, and logout from the system as this file only apply at next login.

Then open a terminal window and type :

ulimit -S -n 20000

and from the same terminal type :

skychart

This is very important as the limit change is only for the current instance of the shell, not system width.

es/documentation/catgen.1391889411.txt.gz · Última modificación: 2015/11/06 20:39 (editor externo)