Code Monkey home page Code Monkey logo

linefitting's Introduction

LineFitting

Tests of line fitting algorithms, with a focus on different strategies for multicomponent fitting. Description of key routines:

  • nh3_testcubes.py -- Create a set of test cubes for running multicomponet fitting tests on (see "GAS Test Cubes" below for more details).

  • analysis_tools.py -- Contains tools to analyze test results. A test result can be initialized as a TestResults object for quick analysis.

  • analysis_template.ipynb -- A template to run identical analysis on different fitting methods. This notebook wraps around analysis_tools.py and uses example_result.txt as an example.

  • example_result.txt -- The example test result to be used in tandem with analysis_template.ipynb.

GAS Test Cubes

A test set of 10,000 cubes are generated via nh3_testcubes.py for a benchmark comparison between different line-fitting algorithms. A synthetic ammonia spectrum modelled by either one or two velocity slabs is generated at the central pixel of each test cube. The remainder pixels in the cube are filled with models nearly identical to that of the center pixel, differ only by a small velocity offset for individual velocity slabs.

Peformance of the line-fitting algorithms are compared against one another statically based on their fits to the central pixel of the cubes. Default random seed for the cube generation is set to 42 to accommodate further needs to make spectrum-to-spectrum comparisons.

Distributions of the Test Set Parameters

The physical parameters used to generate the test cubes are randomly drawn from the following distributions for each velocity slap:

  • Velocity centroid:
    • First slab: uniformly distributed in the range of [-2.5, 2.5) km s-1.
    • Second slab: uniformly distributed in the range of [-2.5, 2.5) km s-1, with respect to velocity centroid of the first slab.
  • Linewidth:
    • Quadrature-sum of the thermal and the non-thermal linewidths
    • Thermal linewidth: 0.08 km s-1
    • Non-thermal linewidth: log-normally distributed in the natural log space. The distribution has an 1-sigma range of [-3.8, -0.8) log(km s-1) in the natural log space.
  • Column Density:
    • Uniformly distributed in the log10 space in the range of [13, 14.5) log(cm-2).
  • Kinetic temperature:
    • Uniform distribution in the range of [8, 25) K

linefitting's People

Contributors

mcyc avatar low-sky avatar jpinedaf avatar

Watchers

James Cloos 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.