Coder Social home page Coder Social logo

drawdecam's Introduction

drawDECam

A simple set of matplotlib API to draw DECam shapes using Plot and/or Polygons.

Requirements:

  • matplotlib (obviously)
  • numpy
  • despyastro (needs wcsutil only)

Examples:

import drawDECam as dDECam
import matplotlib.pyplot as plt

# The Center of the Focal Plane
x0 = dDECam.CCDSECTION_X0
y0 = dDECam.CCDSECTION_Y0

plt.figure(1,figsize=(9,9))

# Rotated DECam
# Draw DECam corners using Polygons at center
dDECam.drawDECamCorners_Polygon(x0,y0,rotate=True,color='red',closed=True,fill=False,ec='b',lw=0.5)

# Draw DECam CCDS using Polygons no filling
dDECam.drawDECamCCDs_Polygon(x0,y0,trim=True,rotate=True,label=True,fill=False,ls='-',lw=0.5,color='k')

# Draw DECam CCDS using Polygons fill
dDECam.drawDECamCCDs_Polygon(x0,y0,trim=True,rotate=True,label=True,fill=True,
ls='-', lw=0.5,color='r',alpha=0.1)

# Un-Rotated DECam
# Draw DECam CCDs using Plot function (Unrotated)
drawDECamCCDs_Plot(x0,y0,rotate=False,label=True, color='k',lw=0.5,ls='-')

# Draw DECam Corners using Plot function (Unrotated)
drawDECamCorners_Plot(x0,y0,rotate=False,color='blue',lw=0.5,ls='-')

# DECam Corners on sky -- uses simple 'fake' RA-TAN projection
drawDECamCorners_Sky(ra,dec,pixscale=0.27,label=False,color='k',lw=0.5,ls='-')

# DECam CCDs
drawDECamCCDs_Sky(ra,dec,trim=True,pixscale=0.27,label=False,color='k',ls='-')```

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.