Commit ae4c095d authored by BO ZHANG's avatar BO ZHANG 🏀
Browse files

added package info

parent c70ee73d
Loading
Loading
Loading
Loading

.gitignore

0 → 100644
+136 −0
Original line number Diff line number Diff line
.idea/*
*.png
*.DS_Store*

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
#  Usually these files are written by a python script from a template
#  before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit examples / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
.python-version

# pipenv
#   According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
#   However, in case of collaboration, if having platform-specific dependencies or dependencies
#   having no cross-platform support, pipenv may install dependencies that don't work, or not
#   install all needed dependencies.
#Pipfile.lock

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# joblib temp
joblib*
 No newline at end of file

README.md

0 → 100644
+55 −0
Original line number Diff line number Diff line
## csst_proto 
[![Documentation Status](https://readthedocs.org/projects/csst-proto/badge/?version=latest)](https://csst-proto.readthedocs.io/en/latest/?badge=latest)
 
CSST L1 pipeline prototype.

## homepage

This code is available at *CSST GitLab*:
- [https://csst-tb.bao.ac.cn/code/csst-l1/csst_proto](https://csst-tb.bao.ac.cn/code/csst-l1/csst_proto).

## documentation

A sphinx-based documentation is available at
- [https://csst-proto.readthedocs.io/en/latest/](https://csst-proto.readthedocs.io/en/latest/)

## dependency

- numpy~=1.20.3
- joblib~=1.1.0
- astropy~=5.1

## installation

`csst_proto` can be installed with the following shell command

```bash
git clone https://csst-tb.bao.ac.cn/code/csst-l1/csst_proto.git
cd csst_proto
pip install -r requirements.txt
python setup.py install
```

or a single-line command

```bash
sh -c "$(curl -fsSL https://csst-tb.bao.ac.cn/code/csst-l1/csst_proto/-/raw/main/install.sh)"
```

## instruction

A simple example on how to use this package:

```python
from csst_proto.top_level_interface import flip_image
from astropy.io import fits

# read an L0 image
img = fits.getdata("CSST_MS_SCI_06_L0_img.fits")
# flip the image
img_flipped = flip_image(img=img)
```

## algorithm description

The `csst_proto` uses an awesome algorithm based on `numpy.ndarray` indices to flip images.

install.sh

0 → 100644
+10 −0
Original line number Diff line number Diff line
echo "csst_common Installer"
echo "=============================================="

pip uninstall csst_common -y

echo "Installing csst_common"
echo "➡==============================================="
pip install git+https://csst-tb.bao.ac.cn/code/csst-l1/csst_common.git
echo "➡==============================================="
echo "🇨🇳🇨🇳🇨🇳🚀🚀🚀Done!"

install_local.sh

0 → 100644
+8 −0
Original line number Diff line number Diff line
#!/usr/bin/env bash
rm -rf build
rm -rf dist
#python setup.py build_ext --inplace
#python setup.py install
python setup.py sdist
pip install dist/*.tar.gz --force-reinstall
rm -rf ./*.egg-info
 No newline at end of file

requirements.txt

0 → 100644
+5 −0
Original line number Diff line number Diff line
numpy~=1.20.3
joblib~=1.1.0
setuptools~=58.0.4
astropy~=5.1
pytest
 No newline at end of file
Loading