sausero


Namesausero JSON
Version 1.1.0 PyPI version JSON
download
home_pagehttps://github.com/Kennicutt/SAUSERO
SummaryThis software is designed to reduce Broad Band Imaging observations obtained with OSIRIS+.
upload_time2025-07-29 11:54:01
maintainerNone
docs_urlNone
authorFabricio M. Pérez-Toledo
requires_python>=3.11
licenseNone
keywords
VCS
bugtrack_url
requirements astroalign astrometry_net_client astropy astroquery ccdproc lacosmic loguru matplotlib numpy PyYAML sep sphinx sphinx-rtd-theme
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # SAUSERO

__SAUSERO__ is a reduction software for the Broad Band Imaging mode of OSIRIS+ at GTC.

Developed by __Fabricio M. Pérez-Toledo__

## General Description

**S**oftware to **AU**omatize in a **S**imple **E**nvironment the **R**eduction of **O**siris+ data (**SAUSERO**) processes OSIRIS+ raw science frames to address noise, cosmetic defects, and pixel heterogeneity, preparing them for photometric analysis. Correcting these artifacts is a critical prerequisite for reliable scientific analysis. The software applies observation-specific reduction steps, ensuring optimized treatment for different data types. Developed with a focus on simplicity and efficiency, **SAUSERO** streamlines the reduction pipeline, enabling researchers to obtain calibrated data ready for photometric studies.

### Key Reduction Steps:

1. Application of a __Bad Pixel Mask (BPM)__ to all frames.
2. Creation of the __Master Bias__.
3. Creation of the __Master Flat__.
4. Application of master calibration frames to both __standard star__ and __science frames__.
5. Removal of __cosmic rays__.
6. __Sky subtraction__.
7. Alignment of __science frames__.
8. __Astrometric calibration__.
9. __Flux calibration__.

### Input Requirements:

The software requires the following frames as input:

- __Bias frames__
- __Sky flat frames__
- __Photometric standard star frames__
- __Science frames__

## Outputs

The generated results consist of one image per observed band. For each image, the following corrections and calibrations will have been applied:

- __Bias subtraction__
- __Flat-field correction__ (including fringing correction for the Sloan z band, if applicable)
- __Image alignment and stacking__
- __Astrometric calibration__
- __Photometric calibration__ (estimation of the zero-point, ZP ± error)

To address cosmetic defects, a __Bad Pixel Mask (BPM)__ is applied, and the __LACosmic algorithm__ is used to handle cosmic ray removal.

## Requirements

### Operative System
- __Any__: The software is designed to run within a __Conda environment__, ensuring compatibility across platforms.

### Dependencies
The following Python packages are required (minimum versions specified), however, they will be installed
automatically together the :

    astroalign>=2.4.1
    astrometry_net_client>=0.3.0
    astropy>=5.3.4
    astroquery>=0.4.6
    ccdproc>=2.4.1
    lacosmic>=1.1.0
    loguru>=0.7.2
    matplotlib>=3.8.0
    numpy>=1.25.2
    PyYAML>=6.0.2
    sep>=1.2.1`

### Hardware Requirements
- __RAM__: Minimum 4GB (higher is recommended for large datasets).

## Installation

Installing SAUSERO is straightforward. Follow these steps:

1. __Activate your Conda environment__ (or create a new one if needed (see below)):
    ```
    conda activate <your_env>

2. __Install SAUSERO__ using `pip`:
    ```
    pip install sausero

That's it! SAUSERO is now almost ready to use ;)

### Optional: Creating a New Conda Environment

If you don’t have an existing Conda environment, you can create one specifically for SAUSERO with the following commands:

    conda create -n sausero_env python=3.9 -y
    conda activate sausero_env
    pip install sausero

## First-Time Setup

Once Conda is set up, you should run __SAUSERO__ for the first time to create the file `configuration.json` that has to be configured.

    sausero -pr <your_program> -bl <your_ob>

- `-pr`: Your GTC program indicator.
- `-bl`: The observed block number.

**ATTENTION**: The first time, the code will 'fail' because the configuration file does not know the root 
directory where the images are stored and your astrometry-api-key. To fix this, follow the instructions below.

You must edit the configuration file, which is located in your home directory inside 
a folder named `sausero/`.

You need to set the following parameters in the configuration file:

1. `PATH_DATA`: Set this to the root directory containing your frames. Example:

    ```
    "PATH_DATA": "/path/to/your/frames/"

The directory structure must follow the format `<Your_Program>_<Your_OB>/`. Inside this directory, you should have 
a `raw/` folder where the original frames are stored. During execution, __SAUSERO__ will create a new folder named 
`reduced/`, where the reduced frames will be saved.

2. `No_Session`: This is your Astrometry.net API key. Example:

    ```
    "No_Session":"astrometry-api-key"

To obtain this key, create an account on [Astrometry.net](https://nova.astrometry.net/). Copy your API key and paste it into the configuration file.

## Running SAUSERO

After updating and saving the configuration file, you can run the command again. This time, the software will execute successfully.

    sausero -pr <your_program> -bl <your_ob>

### Outputs and Results

Once the process is complete, you will find a collection of reduced frames in the `reduced/` folder inside your frame 
directory. The output includes:

A. __Reduced science frames__:
- One version with the sky included.
- One version with the sky subtracted.

B. __Aligned frames__:
- Both sky-included and sky-subtracted versions.

C. __Astrometrized frames__:
- Frames with astrometric calibration applied.

D. __Visualization PNG files__:
- A PNG showing the detected sources in the Field of View (FoV).
- A PNG showing the photometric standard star.

E. __Final reduced science frames__:
- Both sky-included and sky-subtracted versions.


### Important Notes

- By default, __SAUSERO__ ensures your data remains private when using Astrometry.net. The software's internal configuration avoids sharing any data with the Astrometry.net community, ensuring your data's security.

## Project Structure

    SAUSERO/
        BPM/
            BPM_OSIRIS_PLUS.fits -> BAD PIXEL MASK
        config/
            configuration.json   -> Configuration file.
        check_files.py           -> It determines which steps can be performed by the pipeline based on the available FITS files.
        aligning_osirisplus.py   -> Aligns the science frames. 
        astrometry_osirisplus.py -> Astrometrization of the science frames.
        Color_Codes.py           -> Gives color to the comments
        OsirisDRP.py             -> Handles all the sofware and manages the frames. 
        photometry_osirisplus.py -> Carries out the photometric calibration.
        reduction_osirisplus.py  -> Carries out the clean process.

## Note about the frames

The code is designed to work with __OSIRIS+__ frames. They must be in __FITS__ format.

## LICENSE

This software is under __GPL v3.0__ license. More information is available in the
repository.

## CONTACT

- __Email__: [fabricio.perez@gtc.iac.es](fabricio.perez@gtc.iac.es)

- __Repository__: [https://github.com/Kennicutt/SAUSERO](https://github.com/Kennicutt/SAUSERO)

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Kennicutt/SAUSERO",
    "name": "sausero",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.11",
    "maintainer_email": null,
    "keywords": null,
    "author": "Fabricio M. P\u00e9rez-Toledo",
    "author_email": "fabricio.telescope@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/df/a1/192feabd95ff08d284ce9ab31e96f32854bc4d68ba3c19cae25a890aaff0/sausero-1.1.0.tar.gz",
    "platform": null,
    "description": "# SAUSERO\n\n__SAUSERO__ is a reduction software for the Broad Band Imaging mode of OSIRIS+ at GTC.\n\nDeveloped by __Fabricio M. P\u00e9rez-Toledo__\n\n## General Description\n\n**S**oftware to **AU**omatize in a **S**imple **E**nvironment the **R**eduction of **O**siris+ data (**SAUSERO**) processes OSIRIS+ raw science frames to address noise, cosmetic defects, and pixel heterogeneity, preparing them for photometric analysis. Correcting these artifacts is a critical prerequisite for reliable scientific analysis. The software applies observation-specific reduction steps, ensuring optimized treatment for different data types. Developed with a focus on simplicity and efficiency, **SAUSERO** streamlines the reduction pipeline, enabling researchers to obtain calibrated data ready for photometric studies.\n\n### Key Reduction Steps:\n\n1. Application of a __Bad Pixel Mask (BPM)__ to all frames.\n2. Creation of the __Master Bias__.\n3. Creation of the __Master Flat__.\n4. Application of master calibration frames to both __standard star__ and __science frames__.\n5. Removal of __cosmic rays__.\n6. __Sky subtraction__.\n7. Alignment of __science frames__.\n8. __Astrometric calibration__.\n9. __Flux calibration__.\n\n### Input Requirements:\n\nThe software requires the following frames as input:\n\n- __Bias frames__\n- __Sky flat frames__\n- __Photometric standard star frames__\n- __Science frames__\n\n## Outputs\n\nThe generated results consist of one image per observed band. For each image, the following corrections and calibrations will have been applied:\n\n- __Bias subtraction__\n- __Flat-field correction__ (including fringing correction for the Sloan z band, if applicable)\n- __Image alignment and stacking__\n- __Astrometric calibration__\n- __Photometric calibration__ (estimation of the zero-point, ZP \u00b1 error)\n\nTo address cosmetic defects, a __Bad Pixel Mask (BPM)__ is applied, and the __LACosmic algorithm__ is used to handle cosmic ray removal.\n\n## Requirements\n\n### Operative System\n- __Any__: The software is designed to run within a __Conda environment__, ensuring compatibility across platforms.\n\n### Dependencies\nThe following Python packages are required (minimum versions specified), however, they will be installed\nautomatically together the :\n\n    astroalign>=2.4.1\n    astrometry_net_client>=0.3.0\n    astropy>=5.3.4\n    astroquery>=0.4.6\n    ccdproc>=2.4.1\n    lacosmic>=1.1.0\n    loguru>=0.7.2\n    matplotlib>=3.8.0\n    numpy>=1.25.2\n    PyYAML>=6.0.2\n    sep>=1.2.1`\n\n### Hardware Requirements\n- __RAM__: Minimum 4GB (higher is recommended for large datasets).\n\n## Installation\n\nInstalling SAUSERO is straightforward. Follow these steps:\n\n1. __Activate your Conda environment__ (or create a new one if needed (see below)):\n    ```\n    conda activate <your_env>\n\n2. __Install SAUSERO__ using `pip`:\n    ```\n    pip install sausero\n\nThat's it! SAUSERO is now almost ready to use ;)\n\n### Optional: Creating a New Conda Environment\n\nIf you don\u2019t have an existing Conda environment, you can create one specifically for SAUSERO with the following commands:\n\n    conda create -n sausero_env python=3.9 -y\n    conda activate sausero_env\n    pip install sausero\n\n## First-Time Setup\n\nOnce Conda is set up, you should run __SAUSERO__ for the first time to create the file `configuration.json` that has to be configured.\n\n    sausero -pr <your_program> -bl <your_ob>\n\n- `-pr`: Your GTC program indicator.\n- `-bl`: The observed block number.\n\n**ATTENTION**: The first time, the code will 'fail' because the configuration file does not know the root \ndirectory where the images are stored and your astrometry-api-key. To fix this, follow the instructions below.\n\nYou must edit the configuration file, which is located in your home directory inside \na folder named `sausero/`.\n\nYou need to set the following parameters in the configuration file:\n\n1. `PATH_DATA`: Set this to the root directory containing your frames. Example:\n\n    ```\n    \"PATH_DATA\": \"/path/to/your/frames/\"\n\nThe directory structure must follow the format `<Your_Program>_<Your_OB>/`. Inside this directory, you should have \na `raw/` folder where the original frames are stored. During execution, __SAUSERO__ will create a new folder named \n`reduced/`, where the reduced frames will be saved.\n\n2. `No_Session`: This is your Astrometry.net API key. Example:\n\n    ```\n    \"No_Session\":\"astrometry-api-key\"\n\nTo obtain this key, create an account on [Astrometry.net](https://nova.astrometry.net/). Copy your API key and paste it into the configuration file.\n\n## Running SAUSERO\n\nAfter updating and saving the configuration file, you can run the command again. This time, the software will execute successfully.\n\n    sausero -pr <your_program> -bl <your_ob>\n\n### Outputs and Results\n\nOnce the process is complete, you will find a collection of reduced frames in the `reduced/` folder inside your frame \ndirectory. The output includes:\n\nA. __Reduced science frames__:\n- One version with the sky included.\n- One version with the sky subtracted.\n\nB. __Aligned frames__:\n- Both sky-included and sky-subtracted versions.\n\nC. __Astrometrized frames__:\n- Frames with astrometric calibration applied.\n\nD. __Visualization PNG files__:\n- A PNG showing the detected sources in the Field of View (FoV).\n- A PNG showing the photometric standard star.\n\nE. __Final reduced science frames__:\n- Both sky-included and sky-subtracted versions.\n\n\n### Important Notes\n\n- By default, __SAUSERO__ ensures your data remains private when using Astrometry.net. The software's internal configuration avoids sharing any data with the Astrometry.net community, ensuring your data's security.\n\n## Project Structure\n\n    SAUSERO/\n        BPM/\n            BPM_OSIRIS_PLUS.fits -> BAD PIXEL MASK\n        config/\n            configuration.json   -> Configuration file.\n        check_files.py           -> It determines which steps can be performed by the pipeline based on the available FITS files.\n        aligning_osirisplus.py   -> Aligns the science frames. \n        astrometry_osirisplus.py -> Astrometrization of the science frames.\n        Color_Codes.py           -> Gives color to the comments\n        OsirisDRP.py             -> Handles all the sofware and manages the frames. \n        photometry_osirisplus.py -> Carries out the photometric calibration.\n        reduction_osirisplus.py  -> Carries out the clean process.\n\n## Note about the frames\n\nThe code is designed to work with __OSIRIS+__ frames. They must be in __FITS__ format.\n\n## LICENSE\n\nThis software is under __GPL v3.0__ license. More information is available in the\nrepository.\n\n## CONTACT\n\n- __Email__: [fabricio.perez@gtc.iac.es](fabricio.perez@gtc.iac.es)\n\n- __Repository__: [https://github.com/Kennicutt/SAUSERO](https://github.com/Kennicutt/SAUSERO)\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "This software is designed to reduce Broad Band Imaging observations obtained with OSIRIS+.",
    "version": "1.1.0",
    "project_urls": {
        "Homepage": "https://github.com/Kennicutt/SAUSERO"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "4bc5d4c991a7644c13497d2a80ba4ad9fac4a7cdafb9b3875487a676bfb14e74",
                "md5": "80cbd628c4a0c639459c5637466375e5",
                "sha256": "ff8cfe44ad9338c65a711dfe44354461d62968f6ac562898162b7d27d2eec588"
            },
            "downloads": -1,
            "filename": "sausero-1.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "80cbd628c4a0c639459c5637466375e5",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.11",
            "size": 98086,
            "upload_time": "2025-07-29T11:54:00",
            "upload_time_iso_8601": "2025-07-29T11:54:00.114160Z",
            "url": "https://files.pythonhosted.org/packages/4b/c5/d4c991a7644c13497d2a80ba4ad9fac4a7cdafb9b3875487a676bfb14e74/sausero-1.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "dfa1192feabd95ff08d284ce9ab31e96f32854bc4d68ba3c19cae25a890aaff0",
                "md5": "65c3241d45839bd7814dde45b10d3c83",
                "sha256": "056494d46653b60b7eecce2f16236d6a566467373149745a7f5091bc08e0eef6"
            },
            "downloads": -1,
            "filename": "sausero-1.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "65c3241d45839bd7814dde45b10d3c83",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.11",
            "size": 98199,
            "upload_time": "2025-07-29T11:54:01",
            "upload_time_iso_8601": "2025-07-29T11:54:01.102847Z",
            "url": "https://files.pythonhosted.org/packages/df/a1/192feabd95ff08d284ce9ab31e96f32854bc4d68ba3c19cae25a890aaff0/sausero-1.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-29 11:54:01",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Kennicutt",
    "github_project": "SAUSERO",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "astroalign",
            "specs": [
                [
                    "==",
                    "2.6.1"
                ]
            ]
        },
        {
            "name": "astrometry_net_client",
            "specs": [
                [
                    "==",
                    "0.6.0"
                ]
            ]
        },
        {
            "name": "astropy",
            "specs": [
                [
                    "==",
                    "5.3.4"
                ]
            ]
        },
        {
            "name": "astroquery",
            "specs": [
                [
                    "==",
                    "0.4.10"
                ]
            ]
        },
        {
            "name": "ccdproc",
            "specs": [
                [
                    "==",
                    "2.4.1"
                ]
            ]
        },
        {
            "name": "lacosmic",
            "specs": [
                [
                    "==",
                    "1.3.0"
                ]
            ]
        },
        {
            "name": "loguru",
            "specs": [
                [
                    "==",
                    "0.7.2"
                ]
            ]
        },
        {
            "name": "matplotlib",
            "specs": [
                [
                    "==",
                    "3.8.0"
                ]
            ]
        },
        {
            "name": "numpy",
            "specs": [
                [
                    "==",
                    "2.3.0"
                ]
            ]
        },
        {
            "name": "PyYAML",
            "specs": [
                [
                    "==",
                    "6.0.2"
                ]
            ]
        },
        {
            "name": "sep",
            "specs": [
                [
                    "==",
                    "1.4.1"
                ]
            ]
        },
        {
            "name": "sphinx",
            "specs": []
        },
        {
            "name": "sphinx-rtd-theme",
            "specs": []
        }
    ],
    "lcname": "sausero"
}
        
Elapsed time: 1.51691s