GithubHelp home page GithubHelp logo

2dsim's Introduction

2dsim

velocity determination in 2dimensions, achieved by running the 1dim fit once for each access and then combining velocities

EXECUTION STEPS:

Code execution steps: (assuming mirisim has been installed and setup, assuming jwst pipeline has been installed)

clone the directory on git and cd to it
Activate mirisim env and run the simulation file 'simulation.ini'
Exit mirisim env, go back to base or env containing jwst pipeline and other libraries imported in cell 1 of velocity-determination.ipynb
Update the' velocity-determination.ipynb' notebook

    correct ippath (directory of outpit from mirisim) and 'ipname' (indicating the exact output to use) in cell2 based on mirisim output you want to use
    In cell 4, update maskrefpath to a relevant refmask for the mirifov in your local miri crds, our simulations use ' … /crds/references/jwst/miri/jwst_miri_mask_0023.fits' and the 'do not use' flagged pixels where bit 0 is set are all filled with nan values

Run all cells till the text cell that says 'basic fit'
After that chose to run the cells for the velocities you wish to evaluate, a new velocity will produce a new simulation and hence take some time

PLEASE NOTE :

Changes to stella's files before use for simulation -

Change_pixeldq.py :

packaged in a function to accept two arguments, 1- input file path 2- output file path
closed the open hdul at the end

function_move_source.py :

added argument refmask which is the reference mask for the miri fov stacked to be the same size as the simulated science array from mirisim

move_source_code.py :

packaged the execution part of the code into a function that accepts arguments move(inputdir, outputdir, velin, refmask, stattomoving = True):

Velin is the multiple of 0.010996 arcsec/sec to be used for the simulation

theta multiplied by 1.25 to represent asteroid velocity direction at 45 degrees to x-axis

flag_move_source passed through the stattomoving argument and flipped, True now means move a stationary source

Accepts and propagates the refmask array to function_move_source

Closed the open hdul at the end

simulation files

Point.ini : cen changed to '0 6' to ensure no artefacts exist close to our object row/column

simulation.ini updated to change the name of the scene.ini file to point.ini

Except the addition of the refmask and correcting the scene file name, other changes do not improve the code in any way, but were intended to make it easier to use for our specific implementation

2dsim's People

Contributors

ambarqadeer avatar

Watchers

 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.