• Stars
    star
    281
  • Rank 147,023 (Top 3 %)
  • Language
    Fortran
  • License
    BSD 2-Clause "Sim...
  • Created over 14 years ago
  • Updated almost 6 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Collection of personal scientific routines in Fortran 📖
This is a collection of Fortran routines I have written over the years for use
in more complex codes. The different files are as independent as possible from
each other, but in some cases dependencies are unavoidable.

A lot of routines are written so as to work with both single and double type
precision. These are in the templates/ directory, and are coded using generic
types. The files in templates are not valid Fortran, and will not compile.
Running the parse.py script automatically generates the full source code from
these templates, and places the results in src.

base_types.f90 (no dependencies)
  Defines numeric types
  
lib_algebra.f90 (no dependencies)
  Defines the following routines:
    - cube root
    - several quadratic solvers
    - Simpson's rule integrator
    - Gaussian elimination linear equations solver

lib_array.f90 (no dependencies)
  Defines the following routines:
    - linspace: create an array of values equally spaced in linear space
    - logspace: create an array of values equally spaced in log space
    - index_array_1d: find the order array elements should be in to be sorted
    - sort: sort one or two arrays
    - integral: trapezium integration
    - integral_linlog: trapezium integration with linear-log interpolation
    - integral_loglin: trapezium integration with log-linear interpolation
    - integral_loglog: trapezium integration with log-log interpolation
    - cumulative_integral: cumulative version of integral
    - cumulative_integral_linlog: cumulative version of integral_linlog
    - cumulative_integral_loglin: cumulative version of integral_loglin
    - cumulative_integral_loglog: cumulative version of integral_loglog
    - locate: search for a value in a sorted array
    - interp1d: 1-D linear interpolation
    - interp2d: 2-D linear interpolation
    - interp1d_linlog: 1-D linear interpolation in linear-log space
    - interp1d_loglin: 1-D linear interpolation in log-linear space
    - interp1d_loglog: 1-D linear interpolation in log-log space
    - histogram1d: convert an array of values to a histogram
    - histogram2d: convert two arrays of values to a 2-D histogram
    - ipos: bin value for equally spaced bins
    - xval: find center of bin for equally spaced bins
    
lib_cfitsio.f90 (requires the cfitsio library to be installed)
  Defines wrapper routines for the cfitsio library
  
lib_conf.f90 (no dependencies)
  Defines routines to make it easy to read Apache-style configuration files
  
lib_constants.f90 (no dependencies)
  Defines some physical constants in SI and CGS units
  
lib_hdf5.f90 (requires the HDF5 library to be installed)
  Defines wrapper routines for the HDF5 library
  
lib_io.f90 (requires the posix_*.f90 modules - see below)
  Defines various I/O operations (file deletion with confirmation, etc.)

lib_messages.f90
  Defines warning/error routines
  
lib_random.f90
  Defines routines to sample random numbers:
    - uniform random numbers between 0 and 1
    - uniform random numbers between two bounds
    - random number from exp(-x) PDF
    - random number from a normal distribution
    - random position on a sphere
    - random Poisson variables
    - random frequency from a Planck function

posix_default.f90 and posix_nag.f90
  Define various low-level routines, such as checking for file/directory
  existence, and a routine to sleep a program for an amount of time defined in
  microseconds. If using the NAG f95 compiler, use posix_nag.f90, otherwise
  use posix_default.f90
  
type_angle3d.f90 (requires lib_random.f90)
  Defines a derived type for 3D angles, and associated routines
  
type_pdf.f90 (requires lib_array.f90 and lib_random.f90)
  Defines derived types for discrete and continuous PDFs, and associated
  routines (including for sampling the PDFs).

type_stokes.f90
  Defines a derived type for Stokes vectors, and associated routines
  
type_vector3d.f90 (requires lib_random.f90 and type_angle3d.f90)
  Defines a derived type for 3D vectors, and associated routines


More Repositories

1

psrecord

Record the CPU and memory activity of a process 📈
Python
528
star
2

mpl-scatter-density

⚡ Fast scatter density plots for Matplotlib ⚡
Python
481
star
3

fast-histogram

⚡ Fast 1D and 2D histogram functions in Python ⚡
C
267
star
4

pypi-timemachine

Install packages with pip as if you were in the past!
Python
109
star
5

acknowledgment-generator

Easily generate acknowledgment sections for papers
JavaScript
40
star
6

numtraits

Sanity checking for numerical properties/traits 🔢
Python
36
star
7

wcsaxes

wcsaxes has been merged into astropy!
Python
22
star
8

py4sci

Python Programming for Scientists - Lecture notes
HTML
21
star
9

sedfitter

Python version of the SED fitter from Robitaille et al., 2007, ApJS 169 328
Python
20
star
10

pyavm

Pure-python AVM library
Python
19
star
11

autowheel

Automatically build wheels for packages released on PyPI
Python
15
star
12

python-qt-tutorial

Python Qt tutorial
Python
14
star
13

idlsave

IDLSave - a python module to read IDL 'save' files
Python
12
star
14

colormapize

Generate colormaps from images!
Python
10
star
15

voila-qt-app

Jupyter Notebook
8
star
16

genetic

Very simple parallel genetic algorithm code
Python
8
star
17

scientific-python-survey-2015

Results for the 2015 Scientific Python survey
7
star
18

multistatus

This is no longer needed since GitHub now has an official version of this!
Python
6
star
19

example-travis-conda

How to use Miniconda to install dependencies on Travis CI
5
star
20

python-montage

This package is deprecated - please see
Python
5
star
21

python4vienna

Python/Astropy course at the University of Vienna, June 1st-3rd 2015
Python
4
star
22

py4sci-notes

Python
4
star
23

git-workflows

Scripts used to perform various complex git actions
Shell
4
star
24

pieceofcake

a user-friendly cookiecutter wrapper 🍰 ❤️ 🍪
Python
3
star
25

auto_bibtex

Automatically produce BibTeX file for LaTeX manuscript using the NASA ADS database
Python
3
star
26

vtk_python_sandbox

Python
3
star
27

Astropy4MPIK

Astropy workshop for the Max-Planck-Institut fĂźr Kernphysik
Python
3
star
28

macports-python

Installation instructions for Python using MacPorts
3
star
29

mpl_styles

Python
3
star
30

batchpr

Package in need of a better name to automate opening pull requests 🤖
Python
3
star
31

problem_set_7

Problem Set 7 for the course Python: Programming for Scientists
Python
3
star
32

astrodendro-deprecated

Computing Astronomical Dendrograms
Python
3
star
33

robo-ph

#dotastro hack
Python
3
star
34

empty_folders

Simple Automator app to find and trash empty folders
3
star
35

dasktropy

Jupyter Notebook
2
star
36

mpia_contributing

2
star
37

tox-timemachine

Python
2
star
38

calling-c-libraries-from-python

Experiments with linking to C libraries from Python
Python
2
star
39

vispy-multivol

MultiVolumeVisual class for Vispy that allows multiple volumes to be shown at the same time
Python
2
star
40

mining_acknowledgments

1
star
41

arxivminer

ArXiV miner
Python
1
star
42

fun-with-adsb

Scripts related to ADS-B data
Python
1
star
43

cube-viewer

Experiments with 3-d spectral cube viewing
Python
1
star
44

dotastro8-remote

Jupyter Notebook
1
star
45

image_format

Experimental: Understanding the CASA image format
Python
1
star
46

astropy_issue_stats

Statistics on open/closed Astropy issues
Python
1
star
47

sedfitter-legacy

Fortran/Legacy version of the SED fitter from Robitaille et al., 2007, ApJS 169 328
Fortran
1
star
48

generate-setup-cfg

Script to generate setup.cfg files
Python
1
star
49

python-intro

Jupyter Notebook
1
star
50

wheel-forge

1
star
51

editable-mpl-selectors

Experimental Matplotlib compatible selectors
Python
1
star
52

fractal

Fractal distribution of points
Python
1
star
53

astropy4cambridge

Astropy workshop at the University of Cambridge
Jupyter Notebook
1
star
54

py2app-experiments

Experiments with Py2App
Python
1
star
55

python4imprs

Python for IMPRS students
Python
1
star
56

astropy-graphs

Various graphs related to the Astropy project
Python
1
star
57

mpl_font_testing

Python
1
star
58

timecard

A simple Python + Dropbox based command-line timecard
Python
1
star
59

casa-astropy

Experimental code for linking CASA and Astropy
1
star
60

freetype_version_testing

Python
1
star
61

python-versions-survey

Survey conducted in November 2012 to find out about Scientific Python Installations
Python
1
star