Coder Social home page Coder Social logo

lewisfish / pawlikmorph-lsst Goto Github PK

View Code? Open in Web Editor NEW
1.0 4.0 2.0 32.9 MB

Translation and optimisation of SEDMORPH's PawlikMorph IDL code for analysing images of galaxies from SDSS data release 7

License: MIT License

Python 100.00%
asymmetry-calculation analysing-images galaxies lsst morphology python numpy sdss hsc optimisation

pawlikmorph-lsst's Introduction

PawlikMorph-LSST

Documentation Status Language grade: Python

Translation and optimisation of SEDMORPH's PawlikMorph IDL code for analysing images of galaxies from SDSS data release 7

Replicates the ability to prepare images, generate object binary masks and calculate the shape asymmetry parameters, CAS, gini, M20 and Sersic parameters.

Usage

See the Docs for full information.

python imganalysis.py [-h] [-A] [-As] [-Aall] [-sersic] [-spm] [-sci] [-li] [-lif] [-f FILE] [-fo FOLDER] [-src {SDSS,LSST}] [-s IMGSIZE] [-cc CATALOGUE] [-ns NUMSIG] [-fs {1,3,5,7,9,11,13,15}] [-par {multi,parsl,none}] [-n CORES] [-cas] [-segmap][-starmask][-d]

  • -h, shows the help screen
  • -f FILE, File which contains list of image filenames, and RA DECS of object in image (RA and DEC can be zeros if galaxy is centred on cut-out)
  • -fo FOLDER, Path to folder to save script outputs, and where input segmaps and starmasks are located
  • -A, runs the asymmetry calculation
  • -As, Runs the shape asymmetry calculation
  • -Aall, Runs all the implmented asymmetry calculations
  • -cas, Calculate CAS parameters
  • -spm, Save calculated binary pixelmaps
  • -sci, Save cleaned image
  • -li, Use larger image cutouts to estimate sky background
  • -src, Source of the image
  • -cc, Check if any object in the provided catalogue occludes the analysed object
  • -sersic, Calculate Sersic profile
  • -fs, Size of kernel for mean filter
  • -ns, Radial extent to which mask out stars if a catalogue is provided
  • -par, Choose which library to use to parallelise script, {multi, parsl, none}
  • -n, Number of cores to use
  • -segmap, use precomputed segmentation map of galaxy as fits images named 'segmap_' + filename in the OUTPUT folder.
  • -starmask, use precomputed star mask as fits images named 'starmask_' + filename in the OUTPUT folder (mutually exclusive to segmap and catalogue)
  • -d, create diagnostic figures for each galaxy

Example

This will read images from images.csv, generate a folder sample/output where pixelmaps of the object, clean images, segmentation maps and calculated parameters are stored:

  • python imganalysis.py --file images.csv -fo sample -Aall -cas -sci -spm

An example using parallel processing with 8 cores:

  • python imganalysis.py --file images.csv -fo sample -Aall -sersic -sci -spm -par parsl -n 8 -cas

Installation

First clone this repo. Then either use pip or conda to install dependencies:

  • pip install --user --requirement requirements.txt

Or

  • conda env create -f environment.yml

In this case you will need to activate the environment before running the code:

  • conda activate pawlikMorph-lsst

Requirments

  • Python 3.7+
  • Numpy 1.15.4+
  • Numba 0.38.1+
  • Astropy 3.0.3+
  • Scikit-image 0.14.0+
  • Pandas 0.25.3+
  • photutils 0.7.1
  • scipy 1.3.2+
  • parsl 0.9.0+

If diagnostic.py is used

  • matplotlib

pawlikmorph-lsst's People

Contributors

dependabot[bot] avatar lewisfish avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.