MapLine 1.0.7__tar.gz → 1.0.8__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,204 @@
1
+ Metadata-Version: 2.1
2
+ Name: MapLine
3
+ Version: 1.0.8
4
+ Summary: A Python implementation of the 3D emission line fitting code
5
+ Home-page: https://github.com/hjibarram/Map_line
6
+ Download-URL: https://github.com/hjibarram/Map_line/archive/refs/tags/v1.0.8.tar.gz
7
+ Author: hjibarram
8
+ Author-email: hjibarram@gmail.com
9
+ License: MIT
10
+ Keywords: galaxies
11
+ Classifier: Development Status :: 5 - Production/Stable
12
+ Classifier: License :: OSI Approved :: MIT License
13
+ Classifier: Programming Language :: Python :: 3.8
14
+ Classifier: Topic :: Scientific/Engineering :: Astronomy
15
+ Description-Content-Type: text/markdown
16
+ Requires-Dist: astropy
17
+ Requires-Dist: matplotlib
18
+ Requires-Dist: numpy
19
+ Requires-Dist: scipy
20
+ Requires-Dist: cloup
21
+ Requires-Dist: click
22
+ Requires-Dist: emcee
23
+ Requires-Dist: tqdm
24
+
25
+ # MapLine 1.0.8
26
+
27
+ ## Description
28
+
29
+ **MapLine** is an emission line fitting software optimized for active galactic nuclei (AGN) spectra, whether one-dimensional or obtained through integral field spectroscopy (IFS). Its main purpose is to characterize the broad and narrow components of various emission lines in the optical range. It allows modifying aspects such as the number of components to fit, the lines to consider, the flux profile (Gaussian, double Gaussian, Lorentzian, skew), the spectral fitting range, the input/output file type, continuum extraction, among others. The software is written in Python and has a modular structure, making it easy to customize and adapt to different analysis needs.
30
+
31
+ ## Installation
32
+
33
+ First, verify the Python version installed on your system. MapLine requires Python 3.12.3 or higher.
34
+
35
+ It is recommended to create a virtual environment for installing MapLine and the necessary dependencies. This allows better control of the environment and avoids conflicts with other installed packages. You can create a virtual environment with the following commands:
36
+
37
+ ```bash
38
+ # Create a folder for virtual environments
39
+ mkdir .venvs
40
+
41
+ # Create a virtual environment named 'MyEnv'
42
+ python -m venv .venvs/MyEnv
43
+
44
+ # Activate the virtual environment
45
+ source .venvs/MyEnv/bin/activate
46
+ ```
47
+
48
+ Once the virtual environment is activated, you can install MapLine with the following command:
49
+
50
+ ```bash
51
+ pip install mapline
52
+ ```
53
+
54
+ During the installation, all necessary dependencies will be installed.
55
+
56
+ ## Project Structure
57
+
58
+ MapLine is composed of different modules that contain the functions needed for emission line fitting:
59
+
60
+ - **line_fit.py**: Main module that contains the fitting functions for one-dimensional spectra (`line_fit_single`) and data cubes (`line_fit`).
61
+ - **mcmc.py**: Implements the Monte Carlo – Markov Chain (MCMC) algorithm to optimize emission line fitting using the `emcee` package.
62
+ - **models.py**: Contains the emission line models used in the fitting, such as `emission_line_model` and `line_model`.
63
+ - **priors.py**: Provides statistical functions to estimate the likelihood and initial parameter values for fitting.
64
+ - **tools.py**: Includes additional tools such as reading `.fits` files and handling configuration files.
65
+
66
+ ## Usage
67
+
68
+ MapLine is run from the command line using the `run_mapline` command. The basic execution structure is as follows:
69
+
70
+ ```bash
71
+ run_mapline [options]
72
+ ```
73
+
74
+ Some available commands are:
75
+
76
+ - `run`: Runs MapLine to fit emission lines.
77
+ - `runoned`: Gets the spectrum model.
78
+
79
+ ### Options
80
+
81
+ | Option | Description |
82
+ |-------------------|----------------------------------------------|
83
+ | `-g, --config_file` | Configuration file name. |
84
+ | `-n, --name` | Data cube name. |
85
+ | `-o, --name_out` | Output file name. |
86
+ | `-m, --mask` | Mask file name. |
87
+ | `-p, --path` | Path to the data cube. |
88
+ | `-y, --path_out` | Path to the output files. |
89
+ | `-c, --ncpus` | Number of CPUs to use. |
90
+ | `-d, --double` | Enable double Gaussian mode. |
91
+ | `-k, --kskew` | Enable skew line mode. |
92
+ | `-t, --test` | Test mode. |
93
+ | `-e, --error` | Calculate error vector. |
94
+ | `-z, --zt` | Object redshift. |
95
+
96
+ For example, to run MapLine using a configuration file named `config.yml`, using 6 CPUs, the double Gaussian model, and a line configuration file named `line_prop.yml`, the command would be:
97
+
98
+ ```bash
99
+ run_mapline -g config.yml -c 6 -d -q line_prop.yml
100
+ ```
101
+
102
+ All these options, along with additional ones, can also be specified in the configuration file.
103
+
104
+ ## Configuration Files
105
+
106
+ MapLine allows defining several parameters through configuration files, such as `config.yml` and `line_prop.yml`. These files allow full customization of the settings and options of the program to meet the user's specific needs.
107
+
108
+ ## Contributions
109
+
110
+ Contributions to MapLine are welcome. You can submit your suggestions, bug reports, or improvements through the official GitHub repository.
111
+
112
+ ## License
113
+
114
+ MapLine is distributed under the MIT license. You are free to use, modify, and distribute it, as long as proper attribution is maintained.
115
+
116
+ ## Español
117
+ ## Descripción
118
+
119
+ **MapLine** es un software de ajuste de líneas de emisión optimizado para espectros de núcleos activos de galaxias (AGN), ya sean unidimensionales o obtenidos por espectroscopía de campo integral (IFS). Su principal propósito es caracterizar los componentes anchos y angostos de varias líneas de emisión en el rango óptico. Permite modificar aspectos como el número de componentes a ajustar, las líneas a considerar, el perfil de flujo (gaussiano, doble gaussiano, lorentziano, skew), el rango espectral de ajuste, el tipo de archivo de entrada/salida, la extracción del continuo, entre otros. El software está escrito en Python y tiene una estructura modular, lo cual facilita su personalización y adaptación a diferentes necesidades de análisis.
120
+
121
+ ## Instalación
122
+
123
+ Primero, verifica la versión de Python instalada en tu equipo. MapLine requiere Python 3.12.3 o superior.
124
+
125
+ Es recomendable crear un entorno virtual para la instalación de MapLine y las dependencias necesarias. Esto permite un mejor control del entorno y evita conflictos con otros paquetes instalados. Puedes crear un entorno virtual con los siguientes comandos:
126
+
127
+ ```bash
128
+ # Crear una carpeta para entornos virtuales
129
+ mkdir .venvs
130
+
131
+ # Crear un entorno virtual llamado 'MyEnv'
132
+ python -m venv .venvs/MyEnv
133
+
134
+ # Activar el entorno virtual
135
+ source .venvs/MyEnv/bin/activate
136
+ ```
137
+
138
+ Una vez activado el entorno virtual, puedes instalar MapLine con el siguiente comando:
139
+
140
+ ```bash
141
+ pip install mapline
142
+ ```
143
+
144
+ Durante la instalación se instalarán todas las dependencias necesarias.
145
+
146
+ ## Estructura del Proyecto
147
+
148
+ MapLine está compuesto por distintos módulos que contienen las funciones necesarias para los ajustes de líneas de emisión:
149
+
150
+ - **line_fit.py**: Módulo principal que contiene las funciones de ajuste para espectros en una dimensión (`line_fit_single`) y para cubos de datos (`line_fit`).
151
+ - **mcmc.py**: Implementa el algoritmo Monte Carlo – Markov Chain (MCMC) para optimizar los ajustes de líneas de emisión usando la paquetería `emcee`.
152
+ - **models.py**: Contiene los modelos de líneas de emisión utilizados en los ajustes, como `emission_line_model` y `line_model`.
153
+ - **priors.py**: Proporciona funciones estadísticas para estimar la confiabilidad (likelihood) y los valores iniciales de los parámetros de ajuste.
154
+ - **tools.py**: Incluye herramientas adicionales como la lectura de archivos en formato `.fits` y manejo de archivos de configuración.
155
+
156
+ ## Uso
157
+
158
+ MapLine se ejecuta desde la línea de comandos utilizando la instrucción `run_mapline`. La estructura básica de ejecución es la siguiente:
159
+
160
+ ```bash
161
+ run_mapline [opciones]
162
+ ```
163
+
164
+ Algunos de los comandos disponibles son:
165
+
166
+ - `run`: Ejecuta MapLine para ajustar líneas de emisión.
167
+ - `runoned`: Obtiene el modelo del espectro.
168
+
169
+ ### Opciones
170
+
171
+ | Opción | Descripción |
172
+ |------------------|----------------------------------------------|
173
+ | `-g, --config_file` | Nombre del archivo de configuración. |
174
+ | `-n, --name` | Nombre del cubo de datos. |
175
+ | `-o, --name_out` | Nombre de los archivos de salida. |
176
+ | `-m, --mask` | Nombre del archivo de 'máscara'. |
177
+ | `-p, --path` | Ruta al cubo de datos. |
178
+ | `-y, --path_out` | Ruta de los archivos de salida. |
179
+ | `-c, --ncpus` | Número de CPUs a utilizar. |
180
+ | `-d, --double` | Activar el modo de doble gaussiana. |
181
+ | `-k, --kskew` | Activar el modo skew line. |
182
+ | `-t, --test` | Modo de prueba. |
183
+ | `-e, --error` | Calcular el vector de errores. |
184
+ | `-z, --zt` | Redshift del objeto. |
185
+
186
+ Por ejemplo, para ejecutar MapLine usando un archivo de configuración llamado `config.yml`, utilizando 6 CPUs, el modelo de doble gaussiana, y un archivo de configuración de líneas de emisión llamado `line_prop.yml`, el comando sería:
187
+
188
+ ```bash
189
+ run_mapline -g config.yml -c 6 -d -q line_prop.yml
190
+ ```
191
+
192
+ Todas estas opciones, junto con otras adicionales, también pueden ser especificadas en el archivo de configuración.
193
+
194
+ ## Archivos de Configuración
195
+
196
+ MapLine permite definir varios parámetros a través de archivos de configuración, como `config.yml` y `line_prop.yml`. Estos archivos permiten personalizar completamente los ajustes y opciones del programa para adaptarse a las necesidades específicas del usuario.
197
+
198
+ ## Contribuciones
199
+
200
+ Las contribuciones a MapLine son bienvenidas. Puedes enviar tus sugerencias, errores encontrados, o mejoras a través del repositorio oficial en GitHub.
201
+
202
+ ## Licencia
203
+
204
+ MapLine está distribuido bajo la licencia MIT. Puedes usarlo, modificarlo y distribuirlo libremente siempre y cuando se mantenga la atribución correspondiente.
@@ -3,5 +3,5 @@ import numpy as np
3
3
  globally across the MapLine modules
4
4
  """
5
5
 
6
- __version__ = 'MapLine v1.0.7'
6
+ __version__ = 'MapLine v1.0.8'
7
7
 
mapline-1.0.8/PKG-INFO ADDED
@@ -0,0 +1,204 @@
1
+ Metadata-Version: 2.1
2
+ Name: MapLine
3
+ Version: 1.0.8
4
+ Summary: A Python implementation of the 3D emission line fitting code
5
+ Home-page: https://github.com/hjibarram/Map_line
6
+ Download-URL: https://github.com/hjibarram/Map_line/archive/refs/tags/v1.0.8.tar.gz
7
+ Author: hjibarram
8
+ Author-email: hjibarram@gmail.com
9
+ License: MIT
10
+ Keywords: galaxies
11
+ Classifier: Development Status :: 5 - Production/Stable
12
+ Classifier: License :: OSI Approved :: MIT License
13
+ Classifier: Programming Language :: Python :: 3.8
14
+ Classifier: Topic :: Scientific/Engineering :: Astronomy
15
+ Description-Content-Type: text/markdown
16
+ Requires-Dist: astropy
17
+ Requires-Dist: matplotlib
18
+ Requires-Dist: numpy
19
+ Requires-Dist: scipy
20
+ Requires-Dist: cloup
21
+ Requires-Dist: click
22
+ Requires-Dist: emcee
23
+ Requires-Dist: tqdm
24
+
25
+ # MapLine 1.0.8
26
+
27
+ ## Description
28
+
29
+ **MapLine** is an emission line fitting software optimized for active galactic nuclei (AGN) spectra, whether one-dimensional or obtained through integral field spectroscopy (IFS). Its main purpose is to characterize the broad and narrow components of various emission lines in the optical range. It allows modifying aspects such as the number of components to fit, the lines to consider, the flux profile (Gaussian, double Gaussian, Lorentzian, skew), the spectral fitting range, the input/output file type, continuum extraction, among others. The software is written in Python and has a modular structure, making it easy to customize and adapt to different analysis needs.
30
+
31
+ ## Installation
32
+
33
+ First, verify the Python version installed on your system. MapLine requires Python 3.12.3 or higher.
34
+
35
+ It is recommended to create a virtual environment for installing MapLine and the necessary dependencies. This allows better control of the environment and avoids conflicts with other installed packages. You can create a virtual environment with the following commands:
36
+
37
+ ```bash
38
+ # Create a folder for virtual environments
39
+ mkdir .venvs
40
+
41
+ # Create a virtual environment named 'MyEnv'
42
+ python -m venv .venvs/MyEnv
43
+
44
+ # Activate the virtual environment
45
+ source .venvs/MyEnv/bin/activate
46
+ ```
47
+
48
+ Once the virtual environment is activated, you can install MapLine with the following command:
49
+
50
+ ```bash
51
+ pip install mapline
52
+ ```
53
+
54
+ During the installation, all necessary dependencies will be installed.
55
+
56
+ ## Project Structure
57
+
58
+ MapLine is composed of different modules that contain the functions needed for emission line fitting:
59
+
60
+ - **line_fit.py**: Main module that contains the fitting functions for one-dimensional spectra (`line_fit_single`) and data cubes (`line_fit`).
61
+ - **mcmc.py**: Implements the Monte Carlo – Markov Chain (MCMC) algorithm to optimize emission line fitting using the `emcee` package.
62
+ - **models.py**: Contains the emission line models used in the fitting, such as `emission_line_model` and `line_model`.
63
+ - **priors.py**: Provides statistical functions to estimate the likelihood and initial parameter values for fitting.
64
+ - **tools.py**: Includes additional tools such as reading `.fits` files and handling configuration files.
65
+
66
+ ## Usage
67
+
68
+ MapLine is run from the command line using the `run_mapline` command. The basic execution structure is as follows:
69
+
70
+ ```bash
71
+ run_mapline [options]
72
+ ```
73
+
74
+ Some available commands are:
75
+
76
+ - `run`: Runs MapLine to fit emission lines.
77
+ - `runoned`: Gets the spectrum model.
78
+
79
+ ### Options
80
+
81
+ | Option | Description |
82
+ |-------------------|----------------------------------------------|
83
+ | `-g, --config_file` | Configuration file name. |
84
+ | `-n, --name` | Data cube name. |
85
+ | `-o, --name_out` | Output file name. |
86
+ | `-m, --mask` | Mask file name. |
87
+ | `-p, --path` | Path to the data cube. |
88
+ | `-y, --path_out` | Path to the output files. |
89
+ | `-c, --ncpus` | Number of CPUs to use. |
90
+ | `-d, --double` | Enable double Gaussian mode. |
91
+ | `-k, --kskew` | Enable skew line mode. |
92
+ | `-t, --test` | Test mode. |
93
+ | `-e, --error` | Calculate error vector. |
94
+ | `-z, --zt` | Object redshift. |
95
+
96
+ For example, to run MapLine using a configuration file named `config.yml`, using 6 CPUs, the double Gaussian model, and a line configuration file named `line_prop.yml`, the command would be:
97
+
98
+ ```bash
99
+ run_mapline -g config.yml -c 6 -d -q line_prop.yml
100
+ ```
101
+
102
+ All these options, along with additional ones, can also be specified in the configuration file.
103
+
104
+ ## Configuration Files
105
+
106
+ MapLine allows defining several parameters through configuration files, such as `config.yml` and `line_prop.yml`. These files allow full customization of the settings and options of the program to meet the user's specific needs.
107
+
108
+ ## Contributions
109
+
110
+ Contributions to MapLine are welcome. You can submit your suggestions, bug reports, or improvements through the official GitHub repository.
111
+
112
+ ## License
113
+
114
+ MapLine is distributed under the MIT license. You are free to use, modify, and distribute it, as long as proper attribution is maintained.
115
+
116
+ ## Español
117
+ ## Descripción
118
+
119
+ **MapLine** es un software de ajuste de líneas de emisión optimizado para espectros de núcleos activos de galaxias (AGN), ya sean unidimensionales o obtenidos por espectroscopía de campo integral (IFS). Su principal propósito es caracterizar los componentes anchos y angostos de varias líneas de emisión en el rango óptico. Permite modificar aspectos como el número de componentes a ajustar, las líneas a considerar, el perfil de flujo (gaussiano, doble gaussiano, lorentziano, skew), el rango espectral de ajuste, el tipo de archivo de entrada/salida, la extracción del continuo, entre otros. El software está escrito en Python y tiene una estructura modular, lo cual facilita su personalización y adaptación a diferentes necesidades de análisis.
120
+
121
+ ## Instalación
122
+
123
+ Primero, verifica la versión de Python instalada en tu equipo. MapLine requiere Python 3.12.3 o superior.
124
+
125
+ Es recomendable crear un entorno virtual para la instalación de MapLine y las dependencias necesarias. Esto permite un mejor control del entorno y evita conflictos con otros paquetes instalados. Puedes crear un entorno virtual con los siguientes comandos:
126
+
127
+ ```bash
128
+ # Crear una carpeta para entornos virtuales
129
+ mkdir .venvs
130
+
131
+ # Crear un entorno virtual llamado 'MyEnv'
132
+ python -m venv .venvs/MyEnv
133
+
134
+ # Activar el entorno virtual
135
+ source .venvs/MyEnv/bin/activate
136
+ ```
137
+
138
+ Una vez activado el entorno virtual, puedes instalar MapLine con el siguiente comando:
139
+
140
+ ```bash
141
+ pip install mapline
142
+ ```
143
+
144
+ Durante la instalación se instalarán todas las dependencias necesarias.
145
+
146
+ ## Estructura del Proyecto
147
+
148
+ MapLine está compuesto por distintos módulos que contienen las funciones necesarias para los ajustes de líneas de emisión:
149
+
150
+ - **line_fit.py**: Módulo principal que contiene las funciones de ajuste para espectros en una dimensión (`line_fit_single`) y para cubos de datos (`line_fit`).
151
+ - **mcmc.py**: Implementa el algoritmo Monte Carlo – Markov Chain (MCMC) para optimizar los ajustes de líneas de emisión usando la paquetería `emcee`.
152
+ - **models.py**: Contiene los modelos de líneas de emisión utilizados en los ajustes, como `emission_line_model` y `line_model`.
153
+ - **priors.py**: Proporciona funciones estadísticas para estimar la confiabilidad (likelihood) y los valores iniciales de los parámetros de ajuste.
154
+ - **tools.py**: Incluye herramientas adicionales como la lectura de archivos en formato `.fits` y manejo de archivos de configuración.
155
+
156
+ ## Uso
157
+
158
+ MapLine se ejecuta desde la línea de comandos utilizando la instrucción `run_mapline`. La estructura básica de ejecución es la siguiente:
159
+
160
+ ```bash
161
+ run_mapline [opciones]
162
+ ```
163
+
164
+ Algunos de los comandos disponibles son:
165
+
166
+ - `run`: Ejecuta MapLine para ajustar líneas de emisión.
167
+ - `runoned`: Obtiene el modelo del espectro.
168
+
169
+ ### Opciones
170
+
171
+ | Opción | Descripción |
172
+ |------------------|----------------------------------------------|
173
+ | `-g, --config_file` | Nombre del archivo de configuración. |
174
+ | `-n, --name` | Nombre del cubo de datos. |
175
+ | `-o, --name_out` | Nombre de los archivos de salida. |
176
+ | `-m, --mask` | Nombre del archivo de 'máscara'. |
177
+ | `-p, --path` | Ruta al cubo de datos. |
178
+ | `-y, --path_out` | Ruta de los archivos de salida. |
179
+ | `-c, --ncpus` | Número de CPUs a utilizar. |
180
+ | `-d, --double` | Activar el modo de doble gaussiana. |
181
+ | `-k, --kskew` | Activar el modo skew line. |
182
+ | `-t, --test` | Modo de prueba. |
183
+ | `-e, --error` | Calcular el vector de errores. |
184
+ | `-z, --zt` | Redshift del objeto. |
185
+
186
+ Por ejemplo, para ejecutar MapLine usando un archivo de configuración llamado `config.yml`, utilizando 6 CPUs, el modelo de doble gaussiana, y un archivo de configuración de líneas de emisión llamado `line_prop.yml`, el comando sería:
187
+
188
+ ```bash
189
+ run_mapline -g config.yml -c 6 -d -q line_prop.yml
190
+ ```
191
+
192
+ Todas estas opciones, junto con otras adicionales, también pueden ser especificadas en el archivo de configuración.
193
+
194
+ ## Archivos de Configuración
195
+
196
+ MapLine permite definir varios parámetros a través de archivos de configuración, como `config.yml` y `line_prop.yml`. Estos archivos permiten personalizar completamente los ajustes y opciones del programa para adaptarse a las necesidades específicas del usuario.
197
+
198
+ ## Contribuciones
199
+
200
+ Las contribuciones a MapLine son bienvenidas. Puedes enviar tus sugerencias, errores encontrados, o mejoras a través del repositorio oficial en GitHub.
201
+
202
+ ## Licencia
203
+
204
+ MapLine está distribuido bajo la licencia MIT. Puedes usarlo, modificarlo y distribuirlo libremente siempre y cuando se mantenga la atribución correspondiente.
@@ -0,0 +1,180 @@
1
+ # MapLine 1.0.8
2
+
3
+ ## Description
4
+
5
+ **MapLine** is an emission line fitting software optimized for active galactic nuclei (AGN) spectra, whether one-dimensional or obtained through integral field spectroscopy (IFS). Its main purpose is to characterize the broad and narrow components of various emission lines in the optical range. It allows modifying aspects such as the number of components to fit, the lines to consider, the flux profile (Gaussian, double Gaussian, Lorentzian, skew), the spectral fitting range, the input/output file type, continuum extraction, among others. The software is written in Python and has a modular structure, making it easy to customize and adapt to different analysis needs.
6
+
7
+ ## Installation
8
+
9
+ First, verify the Python version installed on your system. MapLine requires Python 3.12.3 or higher.
10
+
11
+ It is recommended to create a virtual environment for installing MapLine and the necessary dependencies. This allows better control of the environment and avoids conflicts with other installed packages. You can create a virtual environment with the following commands:
12
+
13
+ ```bash
14
+ # Create a folder for virtual environments
15
+ mkdir .venvs
16
+
17
+ # Create a virtual environment named 'MyEnv'
18
+ python -m venv .venvs/MyEnv
19
+
20
+ # Activate the virtual environment
21
+ source .venvs/MyEnv/bin/activate
22
+ ```
23
+
24
+ Once the virtual environment is activated, you can install MapLine with the following command:
25
+
26
+ ```bash
27
+ pip install mapline
28
+ ```
29
+
30
+ During the installation, all necessary dependencies will be installed.
31
+
32
+ ## Project Structure
33
+
34
+ MapLine is composed of different modules that contain the functions needed for emission line fitting:
35
+
36
+ - **line_fit.py**: Main module that contains the fitting functions for one-dimensional spectra (`line_fit_single`) and data cubes (`line_fit`).
37
+ - **mcmc.py**: Implements the Monte Carlo – Markov Chain (MCMC) algorithm to optimize emission line fitting using the `emcee` package.
38
+ - **models.py**: Contains the emission line models used in the fitting, such as `emission_line_model` and `line_model`.
39
+ - **priors.py**: Provides statistical functions to estimate the likelihood and initial parameter values for fitting.
40
+ - **tools.py**: Includes additional tools such as reading `.fits` files and handling configuration files.
41
+
42
+ ## Usage
43
+
44
+ MapLine is run from the command line using the `run_mapline` command. The basic execution structure is as follows:
45
+
46
+ ```bash
47
+ run_mapline [options]
48
+ ```
49
+
50
+ Some available commands are:
51
+
52
+ - `run`: Runs MapLine to fit emission lines.
53
+ - `runoned`: Gets the spectrum model.
54
+
55
+ ### Options
56
+
57
+ | Option | Description |
58
+ |-------------------|----------------------------------------------|
59
+ | `-g, --config_file` | Configuration file name. |
60
+ | `-n, --name` | Data cube name. |
61
+ | `-o, --name_out` | Output file name. |
62
+ | `-m, --mask` | Mask file name. |
63
+ | `-p, --path` | Path to the data cube. |
64
+ | `-y, --path_out` | Path to the output files. |
65
+ | `-c, --ncpus` | Number of CPUs to use. |
66
+ | `-d, --double` | Enable double Gaussian mode. |
67
+ | `-k, --kskew` | Enable skew line mode. |
68
+ | `-t, --test` | Test mode. |
69
+ | `-e, --error` | Calculate error vector. |
70
+ | `-z, --zt` | Object redshift. |
71
+
72
+ For example, to run MapLine using a configuration file named `config.yml`, using 6 CPUs, the double Gaussian model, and a line configuration file named `line_prop.yml`, the command would be:
73
+
74
+ ```bash
75
+ run_mapline -g config.yml -c 6 -d -q line_prop.yml
76
+ ```
77
+
78
+ All these options, along with additional ones, can also be specified in the configuration file.
79
+
80
+ ## Configuration Files
81
+
82
+ MapLine allows defining several parameters through configuration files, such as `config.yml` and `line_prop.yml`. These files allow full customization of the settings and options of the program to meet the user's specific needs.
83
+
84
+ ## Contributions
85
+
86
+ Contributions to MapLine are welcome. You can submit your suggestions, bug reports, or improvements through the official GitHub repository.
87
+
88
+ ## License
89
+
90
+ MapLine is distributed under the MIT license. You are free to use, modify, and distribute it, as long as proper attribution is maintained.
91
+
92
+ ## Español
93
+ ## Descripción
94
+
95
+ **MapLine** es un software de ajuste de líneas de emisión optimizado para espectros de núcleos activos de galaxias (AGN), ya sean unidimensionales o obtenidos por espectroscopía de campo integral (IFS). Su principal propósito es caracterizar los componentes anchos y angostos de varias líneas de emisión en el rango óptico. Permite modificar aspectos como el número de componentes a ajustar, las líneas a considerar, el perfil de flujo (gaussiano, doble gaussiano, lorentziano, skew), el rango espectral de ajuste, el tipo de archivo de entrada/salida, la extracción del continuo, entre otros. El software está escrito en Python y tiene una estructura modular, lo cual facilita su personalización y adaptación a diferentes necesidades de análisis.
96
+
97
+ ## Instalación
98
+
99
+ Primero, verifica la versión de Python instalada en tu equipo. MapLine requiere Python 3.12.3 o superior.
100
+
101
+ Es recomendable crear un entorno virtual para la instalación de MapLine y las dependencias necesarias. Esto permite un mejor control del entorno y evita conflictos con otros paquetes instalados. Puedes crear un entorno virtual con los siguientes comandos:
102
+
103
+ ```bash
104
+ # Crear una carpeta para entornos virtuales
105
+ mkdir .venvs
106
+
107
+ # Crear un entorno virtual llamado 'MyEnv'
108
+ python -m venv .venvs/MyEnv
109
+
110
+ # Activar el entorno virtual
111
+ source .venvs/MyEnv/bin/activate
112
+ ```
113
+
114
+ Una vez activado el entorno virtual, puedes instalar MapLine con el siguiente comando:
115
+
116
+ ```bash
117
+ pip install mapline
118
+ ```
119
+
120
+ Durante la instalación se instalarán todas las dependencias necesarias.
121
+
122
+ ## Estructura del Proyecto
123
+
124
+ MapLine está compuesto por distintos módulos que contienen las funciones necesarias para los ajustes de líneas de emisión:
125
+
126
+ - **line_fit.py**: Módulo principal que contiene las funciones de ajuste para espectros en una dimensión (`line_fit_single`) y para cubos de datos (`line_fit`).
127
+ - **mcmc.py**: Implementa el algoritmo Monte Carlo – Markov Chain (MCMC) para optimizar los ajustes de líneas de emisión usando la paquetería `emcee`.
128
+ - **models.py**: Contiene los modelos de líneas de emisión utilizados en los ajustes, como `emission_line_model` y `line_model`.
129
+ - **priors.py**: Proporciona funciones estadísticas para estimar la confiabilidad (likelihood) y los valores iniciales de los parámetros de ajuste.
130
+ - **tools.py**: Incluye herramientas adicionales como la lectura de archivos en formato `.fits` y manejo de archivos de configuración.
131
+
132
+ ## Uso
133
+
134
+ MapLine se ejecuta desde la línea de comandos utilizando la instrucción `run_mapline`. La estructura básica de ejecución es la siguiente:
135
+
136
+ ```bash
137
+ run_mapline [opciones]
138
+ ```
139
+
140
+ Algunos de los comandos disponibles son:
141
+
142
+ - `run`: Ejecuta MapLine para ajustar líneas de emisión.
143
+ - `runoned`: Obtiene el modelo del espectro.
144
+
145
+ ### Opciones
146
+
147
+ | Opción | Descripción |
148
+ |------------------|----------------------------------------------|
149
+ | `-g, --config_file` | Nombre del archivo de configuración. |
150
+ | `-n, --name` | Nombre del cubo de datos. |
151
+ | `-o, --name_out` | Nombre de los archivos de salida. |
152
+ | `-m, --mask` | Nombre del archivo de 'máscara'. |
153
+ | `-p, --path` | Ruta al cubo de datos. |
154
+ | `-y, --path_out` | Ruta de los archivos de salida. |
155
+ | `-c, --ncpus` | Número de CPUs a utilizar. |
156
+ | `-d, --double` | Activar el modo de doble gaussiana. |
157
+ | `-k, --kskew` | Activar el modo skew line. |
158
+ | `-t, --test` | Modo de prueba. |
159
+ | `-e, --error` | Calcular el vector de errores. |
160
+ | `-z, --zt` | Redshift del objeto. |
161
+
162
+ Por ejemplo, para ejecutar MapLine usando un archivo de configuración llamado `config.yml`, utilizando 6 CPUs, el modelo de doble gaussiana, y un archivo de configuración de líneas de emisión llamado `line_prop.yml`, el comando sería:
163
+
164
+ ```bash
165
+ run_mapline -g config.yml -c 6 -d -q line_prop.yml
166
+ ```
167
+
168
+ Todas estas opciones, junto con otras adicionales, también pueden ser especificadas en el archivo de configuración.
169
+
170
+ ## Archivos de Configuración
171
+
172
+ MapLine permite definir varios parámetros a través de archivos de configuración, como `config.yml` y `line_prop.yml`. Estos archivos permiten personalizar completamente los ajustes y opciones del programa para adaptarse a las necesidades específicas del usuario.
173
+
174
+ ## Contribuciones
175
+
176
+ Las contribuciones a MapLine son bienvenidas. Puedes enviar tus sugerencias, errores encontrados, o mejoras a través del repositorio oficial en GitHub.
177
+
178
+ ## Licencia
179
+
180
+ MapLine está distribuido bajo la licencia MIT. Puedes usarlo, modificarlo y distribuirlo libremente siempre y cuando se mantenga la atribución correspondiente.
@@ -1,25 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: MapLine
3
- Version: 1.0.7
4
- Summary: A Python implementation of the 3D emission line fitting code
5
- Home-page: https://github.com/hjibarram/Map_line
6
- Download-URL: https://github.com/hjibarram/Map_line/archive/refs/tags/v1.0.7.tar.gz
7
- Author: hjibarram
8
- Author-email: hjibarram@gmail.com
9
- License: MIT
10
- Keywords: galaxies
11
- Classifier: Development Status :: 5 - Production/Stable
12
- Classifier: License :: OSI Approved :: MIT License
13
- Classifier: Programming Language :: Python :: 3.8
14
- Classifier: Topic :: Scientific/Engineering :: Astronomy
15
- Description-Content-Type: text/markdown
16
- Requires-Dist: astropy
17
- Requires-Dist: matplotlib
18
- Requires-Dist: numpy
19
- Requires-Dist: scipy
20
- Requires-Dist: cloup
21
- Requires-Dist: click
22
- Requires-Dist: emcee
23
- Requires-Dist: tqdm
24
-
25
- This is an empty readme file
mapline-1.0.7/PKG-INFO DELETED
@@ -1,25 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: MapLine
3
- Version: 1.0.7
4
- Summary: A Python implementation of the 3D emission line fitting code
5
- Home-page: https://github.com/hjibarram/Map_line
6
- Download-URL: https://github.com/hjibarram/Map_line/archive/refs/tags/v1.0.7.tar.gz
7
- Author: hjibarram
8
- Author-email: hjibarram@gmail.com
9
- License: MIT
10
- Keywords: galaxies
11
- Classifier: Development Status :: 5 - Production/Stable
12
- Classifier: License :: OSI Approved :: MIT License
13
- Classifier: Programming Language :: Python :: 3.8
14
- Classifier: Topic :: Scientific/Engineering :: Astronomy
15
- Description-Content-Type: text/markdown
16
- Requires-Dist: astropy
17
- Requires-Dist: matplotlib
18
- Requires-Dist: numpy
19
- Requires-Dist: scipy
20
- Requires-Dist: cloup
21
- Requires-Dist: click
22
- Requires-Dist: emcee
23
- Requires-Dist: tqdm
24
-
25
- This is an empty readme file
mapline-1.0.7/README.md DELETED
@@ -1 +0,0 @@
1
- This is an empty readme file
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes