Skip to content

Instantly share code, notes, and snippets.

osys = poppy.OpticalSystem()
osys.add_pupil( poppy.CircularAperture(radius=3)) # pupil radius in meters
osys.add_detector(pixelscale=0.010, fov_arcsec=5.0) # image plane coordinates in arcseconds
psf = osys.calc_psf(2e-6) # wavelength in microns
poppy.display_PSF(psf, title='The Airy Function')
@winter-muted
winter-muted / my_gem5_v2.sh
Created November 15, 2018 22:07
gem5 configfile for CDA5106 - bugfix
#!/bin/bash
#############################
# This code is unlicensed.
# Do whatever you want with it.
#############################
# Put this code in your gem5 root directory.
# Name it whatever you want.
# For *nix, be sure to mark it executable...
# $ chmod u+x [name_you_chose]
#
@winter-muted
winter-muted / my_gem5.sh
Created November 15, 2018 21:43
gem5 runscript for CDA5106 project
#!/bin/bash
#############################
# This code is unlicensed.
# Do whatever you want with it.
#############################
# Put this code in your gem5 root directory.
# Name it whatever you want.
# For *nix, be sure to mark it executable...
# $ chmod u+x [name_you_chose]
#
/*
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
@winter-muted
winter-muted / .gitignore
Last active August 9, 2017 15:09 — forked from octocat/.gitignore
Some common .gitignore configurations
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.pyc
# Packages #
/* Device Tree Overlay for enabling the pins that are used in Chapter 13
* This overlay is based on the BB-PRU-01 overlay
* Written by Derek Molloy for the book "Exploring BeagleBone: Tools and
* Techniques for Building with Embedded Linux" by John Wiley & Sons, 2014
* ISBN 9781118935125. Please see the file README.md in the repository root
* directory for copyright and GNU GPLv3 license information.
*/
/dts-v1/;
/plugin/;
// Basic UART usage on the PRU
// This has to run on PRU1 as it seems
// there are only GPIO pins for that PRU
#define PRU0_R31_VEC_VALID 32 // notify program completion
#define PRU_EVTOUT_0 3 // event number sent back
#define UART_BASE_ADDR 0x00028000
#define DLL 0x00028020 // MSB of baud rate divisor
#define DLH 0x00028024 // LSB of baud rate divisor