foscat


Namefoscat JSON
Version 3.6.1 PyPI version JSON
download
home_pageNone
SummaryGenerate synthetic Healpix or 2D data using Cross Scattering Transform
upload_time2025-01-21 13:54:17
maintainerNone
docs_urlNone
authorNone
requires_python>=3.9
licenseBSD-3-Clause
keywords scattering transform component separation denoising
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # foscat

[![Read the Docs](https://readthedocs.org/projects/foscat-documentation/badge/?version=latest)](https://foscat-documentation.readthedocs.io/en/latest)

A python package dedicated to image component separation based on scattering transform analysis designed for high performance computing.

## the concept

The foscat genesis has been built to synthesise data (2D or Healpix) using Cross Scattering Transform. For a detailed method description please refer to https://arxiv.org/abs/2207.12527. This algorithm could be effectively usable for component separation (e.g. denoising).

A demo package for this process can be found at https://github.com/jmdelouis/FOSCAT_DEMO.

## usage

# Short tutorial

https://github.com/IAOCEA/demo-foscat-pangeo-eosc/blob/main/Demo_Synthesis.ipynb

# FOSCAT_DEMO

The python scripts _demo.py_ included in this package demonstrate how to use the foscat library to generate synthetic fields that have patterns with the same statistical properties as a specified image.

# Install foscat library

Before installing, make sure you have python installed in your enviroment.
The last version of the foscat library can be installed using PyPi:

```
pip install foscat
```

Load the FOSCAT_DEMO package from github.

```
git clone https://github.com/jmdelouis/FOSCAT_DEMO.git
```

## Recommended installing procedures for mac users

It is recomended to use python=3.9\*.

```
micromamba create -n FOSCAT
micromamba install -n FOSCAT ‘python==3.9*’
micromamba activate FOSCAT
pip install foscat
git clone https://github.com/jmdelouis/FOSCAT_DEMO.git

```

## Recommended installing procedures HPC users

It is recomended to install tensorflow in advance. For [DATARMOR](https://pcdm.ifremer.fr/Equipement) for using GPU ;

```
micromamba create -n FOSCAT
micromamba install -n FOSCAT ‘python==3.9*’
micromamba install -n FOSCAT ‘tensorflow==2.11.0’
micromamba activate FOSCAT
pip install foscat
git clone https://github.com/jmdelouis/FOSCAT_DEMO.git

```

# Spherical data example

## compute a synthetic image

```
python demo.py -n=32 -k -c -s=100
```

The _demo.py_ script serves as a demonstration of the capabilities of the foscat library. It utilizes the Cross Wavelet Scattering Transform to generate a Healpix map that possesses the same characteristics as a specified input map.

- `-n=32` computes map with nside=32.
- `-k` uses 5x5 kernel.
- `-c` uses Scattering Covariance.
- `-l` uses LBFGS minimizer.
- `-s=100` computes 100 steps.

```
python demo.py -n=8 [-c|--cov][-s|--steps=3000][-S=1234|--seed=1234][-k|--k5x5][-d|--data][-o|--out][-r|--orient] [-p|--path][-a|--adam]

```

- The "-n" option specifies the nside of the input map. The maximum nside value is 256 with the default map.
- The "--cov" option (optional) uses scat_cov instead of scat.
- The "--steps" option (optional) specifies the number of iterations. If not specified, the default value is 1000.
- The "--seed" option (optional) specifies the seed of the random generator.
- The "--path" option (optional) allows you to define the path where the output files will be written. The default path is "data".
- The "--k5x5" option (optional) uses a 5x5 kernel instead of a 3x3.
- The "--data" option (optional) specifies the input data file to be used. If not specified, the default file "LSS_map_nside128.npy" will be used.
- The "--out" option (optional) specifies the output file name. If not specified, the output file will be saved in "demo".
- The "--orient" option (optional) specifies the number of orientations. If not specified, the default value is 4.
- The "--adam" option (optional) makes the synthesis using the ADAM optimizer instead of the L_BFGS.

## plot the result

The following script generates a series of plots that showcase different aspects of the synthesis process using the _demo.py_ script.

> python test2D.py

```
python plotdemo.py -n=32 -c
```

# 2D field demo

> python test2Dplot.py

# compute a synthetic turbulent field

The python scripts _demo2D.py_ included in this package demonstrate how to use the foscat library to generate a 2D synthetic fields that have patterns with the same statistical properties as a specified 2D image. In this particular case, the input field is a sea surface temperature extracted from a north atlantic ocean simulation.

> python testHealpix.py

```
python demo2d.py -n=32 -k -c
```

> python testHplot.py

The following script generates a series of plots that showcase different aspects of the synthesis process using the _demo2D.py_ script.

```
python plotdemo2d.py -n=32 -c
```

For more information, see the [documentation](https://foscat-documentation.readthedocs.io/en/latest/index.html).

> mpirun -np 3 testHealpix_mpi.py

## Authors and acknowledgment

Authors: J.-M. Delouis, P. Campeti, T. Foulquier, J. Mangin, L. Mousset, T. Odaka, F. Paul, E. Allys

This work is part of the R & T Deepsee project supported by CNES. The authors acknowledge the heritage of the Planck-HFI consortium regarding data, software, knowledge. This work has been supported by the Programme National de Télédétection Spatiale (PNTS, http://programmes.insu.cnrs.fr/pnts/), grant n◦ PNTS-2020-08

## License

BSD 3-Clause License

Copyright (c) 2022, the Foscat developers All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

## Project status

It is a scientific driven development. We are open to any contributing development.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "foscat",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": "Theo Foulquier <theo.foulquier@ifremer.fr>",
    "keywords": "scattering transform, component separation, denoising",
    "author": null,
    "author_email": "Jean-Marc DELOUIS <jean.marc.delouis@ifremer.fr>",
    "download_url": "https://files.pythonhosted.org/packages/f3/e7/90e1dfdda13236c2d2dd5a0243a71acbf444b6179bd45cbc16f9a2f8a57b/foscat-3.6.1.tar.gz",
    "platform": null,
    "description": "# foscat\n\n[![Read the Docs](https://readthedocs.org/projects/foscat-documentation/badge/?version=latest)](https://foscat-documentation.readthedocs.io/en/latest)\n\nA python package dedicated to image component separation based on scattering transform analysis designed for high performance computing.\n\n## the concept\n\nThe foscat genesis has been built to synthesise data (2D or Healpix) using Cross Scattering Transform. For a detailed method description please refer to https://arxiv.org/abs/2207.12527. This algorithm could be effectively usable for component separation (e.g. denoising).\n\nA demo package for this process can be found at https://github.com/jmdelouis/FOSCAT_DEMO.\n\n## usage\n\n# Short tutorial\n\nhttps://github.com/IAOCEA/demo-foscat-pangeo-eosc/blob/main/Demo_Synthesis.ipynb\n\n# FOSCAT_DEMO\n\nThe python scripts _demo.py_ included in this package demonstrate how to use the foscat library to generate synthetic fields that have patterns with the same statistical properties as a specified image.\n\n# Install foscat library\n\nBefore installing, make sure you have python installed in your enviroment.\nThe last version of the foscat library can be installed using PyPi:\n\n```\npip install foscat\n```\n\nLoad the FOSCAT_DEMO package from github.\n\n```\ngit clone https://github.com/jmdelouis/FOSCAT_DEMO.git\n```\n\n## Recommended installing procedures for mac users\n\nIt is recomended to use python=3.9\\*.\n\n```\nmicromamba create -n FOSCAT\nmicromamba install -n FOSCAT \u2018python==3.9*\u2019\nmicromamba activate FOSCAT\npip install foscat\ngit clone https://github.com/jmdelouis/FOSCAT_DEMO.git\n\n```\n\n## Recommended installing procedures HPC users\n\nIt is recomended to install tensorflow in advance. For [DATARMOR](https://pcdm.ifremer.fr/Equipement) for using GPU ;\n\n```\nmicromamba create -n FOSCAT\nmicromamba install -n FOSCAT \u2018python==3.9*\u2019\nmicromamba install -n FOSCAT \u2018tensorflow==2.11.0\u2019\nmicromamba activate FOSCAT\npip install foscat\ngit clone https://github.com/jmdelouis/FOSCAT_DEMO.git\n\n```\n\n# Spherical data example\n\n## compute a synthetic image\n\n```\npython demo.py -n=32 -k -c -s=100\n```\n\nThe _demo.py_ script serves as a demonstration of the capabilities of the foscat library. It utilizes the Cross Wavelet Scattering Transform to generate a Healpix map that possesses the same characteristics as a specified input map.\n\n- `-n=32` computes map with nside=32.\n- `-k` uses 5x5 kernel.\n- `-c` uses Scattering Covariance.\n- `-l` uses LBFGS minimizer.\n- `-s=100` computes 100 steps.\n\n```\npython demo.py -n=8 [-c|--cov][-s|--steps=3000][-S=1234|--seed=1234][-k|--k5x5][-d|--data][-o|--out][-r|--orient] [-p|--path][-a|--adam]\n\n```\n\n- The \"-n\" option specifies the nside of the input map. The maximum nside value is 256 with the default map.\n- The \"--cov\" option (optional) uses scat_cov instead of scat.\n- The \"--steps\" option (optional) specifies the number of iterations. If not specified, the default value is 1000.\n- The \"--seed\" option (optional) specifies the seed of the random generator.\n- The \"--path\" option (optional) allows you to define the path where the output files will be written. The default path is \"data\".\n- The \"--k5x5\" option (optional) uses a 5x5 kernel instead of a 3x3.\n- The \"--data\" option (optional) specifies the input data file to be used. If not specified, the default file \"LSS_map_nside128.npy\" will be used.\n- The \"--out\" option (optional) specifies the output file name. If not specified, the output file will be saved in \"demo\".\n- The \"--orient\" option (optional) specifies the number of orientations. If not specified, the default value is 4.\n- The \"--adam\" option (optional) makes the synthesis using the ADAM optimizer instead of the L_BFGS.\n\n## plot the result\n\nThe following script generates a series of plots that showcase different aspects of the synthesis process using the _demo.py_ script.\n\n> python test2D.py\n\n```\npython plotdemo.py -n=32 -c\n```\n\n# 2D field demo\n\n> python test2Dplot.py\n\n# compute a synthetic turbulent field\n\nThe python scripts _demo2D.py_ included in this package demonstrate how to use the foscat library to generate a 2D synthetic fields that have patterns with the same statistical properties as a specified 2D image. In this particular case, the input field is a sea surface temperature extracted from a north atlantic ocean simulation.\n\n> python testHealpix.py\n\n```\npython demo2d.py -n=32 -k -c\n```\n\n> python testHplot.py\n\nThe following script generates a series of plots that showcase different aspects of the synthesis process using the _demo2D.py_ script.\n\n```\npython plotdemo2d.py -n=32 -c\n```\n\nFor more information, see the [documentation](https://foscat-documentation.readthedocs.io/en/latest/index.html).\n\n> mpirun -np 3 testHealpix_mpi.py\n\n## Authors and acknowledgment\n\nAuthors: J.-M. Delouis, P. Campeti, T. Foulquier, J. Mangin, L. Mousset, T. Odaka, F. Paul, E. Allys\n\nThis work is part of the R & T Deepsee project supported by CNES. The authors acknowledge the heritage of the Planck-HFI consortium regarding data, software, knowledge. This work has been supported by the Programme National de T\u00e9l\u00e9d\u00e9tection Spatiale (PNTS, http://programmes.insu.cnrs.fr/pnts/), grant n\u25e6 PNTS-2020-08\n\n## License\n\nBSD 3-Clause License\n\nCopyright (c) 2022, the Foscat developers All rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n\nRedistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n\nRedistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\n\nNeither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.\n\n## Project status\n\nIt is a scientific driven development. We are open to any contributing development.\n",
    "bugtrack_url": null,
    "license": "BSD-3-Clause",
    "summary": "Generate synthetic Healpix or 2D data using Cross Scattering Transform",
    "version": "3.6.1",
    "project_urls": {
        "Documentation": "https://foscat-documentation.readthedocs.io/en/latest/index.html",
        "Issues": "https://github.com/jmdelouis/FOSCAT/issues",
        "Repository": "https://github.com/jmdelouis/FOSCAT.git"
    },
    "split_keywords": [
        "scattering transform",
        " component separation",
        " denoising"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "60593e91200ad65d3649337f75d59466b2b2b1d266b3cd961c719ff8ced4399e",
                "md5": "74a2933916ec38b0d5dc02b619c22622",
                "sha256": "b7c782754a0c56cb67ad87fc8b6f163ec65a8d07efd1ce55340ee64b47c4d2bd"
            },
            "downloads": -1,
            "filename": "foscat-3.6.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "74a2933916ec38b0d5dc02b619c22622",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 78437,
            "upload_time": "2025-01-21T13:54:15",
            "upload_time_iso_8601": "2025-01-21T13:54:15.712207Z",
            "url": "https://files.pythonhosted.org/packages/60/59/3e91200ad65d3649337f75d59466b2b2b1d266b3cd961c719ff8ced4399e/foscat-3.6.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f3e790e1dfdda13236c2d2dd5a0243a71acbf444b6179bd45cbc16f9a2f8a57b",
                "md5": "c47fc853ed9d5b6c5796bc48ea819dd2",
                "sha256": "75f73b16647bcb192f3003d831f8d98c655897c1631a8a94a18c446acd52138a"
            },
            "downloads": -1,
            "filename": "foscat-3.6.1.tar.gz",
            "has_sig": false,
            "md5_digest": "c47fc853ed9d5b6c5796bc48ea819dd2",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 73198,
            "upload_time": "2025-01-21T13:54:17",
            "upload_time_iso_8601": "2025-01-21T13:54:17.209414Z",
            "url": "https://files.pythonhosted.org/packages/f3/e7/90e1dfdda13236c2d2dd5a0243a71acbf444b6179bd45cbc16f9a2f8a57b/foscat-3.6.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-01-21 13:54:17",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "jmdelouis",
    "github_project": "FOSCAT",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "foscat"
}
        
Elapsed time: 0.54749s