Skip to content

Instantly share code, notes, and snippets.

View duncanmmacleod's full-sized avatar

Duncan Macleod duncanmmacleod

View GitHub Profile
32 execve("/bin/ping", ["ping", "google.com"], 0x7fff0aab36a0 /* 14 vars */) = 0
32 brk(NULL) = 0x5636c4dc2000
32 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
32 access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
32 openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
32 fstat(3, {st_mode=S_IFREG|0644, st_size=22386, ...}) = 0
32 mmap(NULL, 22386, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fd9ae8a0000
32 close(3) = 0
32 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
32 openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libcap.so.2", O_RDONLY|O_CLOEXEC) = 3
@duncanmmacleod
duncanmmacleod / gwpy-plot-test.sh
Last active April 25, 2018 10:16
Benchmark tests for gwpy-plot command-line script (part of gwpy python package)
# timeseries
gwpy-plot timeseries --chan L1:IMC-PWR_IN_OUT16 --start '00:00' --duration 60 --interactive -vv
# spectrum
gwpy-plot spectrum --chan H1:GDS-CALIB_STRAIN --start 1126259446 --duration 32 --interactive -v
# spectrogram
gwpy-plot spectrogram --chan H1:GDS-CALIB_STRAIN --start 1126259446 --duration 32 --interactive -vv --epoch 1126259462 --norm
# coherence
@duncanmmacleod
duncanmmacleod / ligo-scattering-animation.py
Created March 25, 2018 04:49
Animation of impact of beam scattering noise on spectral sensitivity of LIGO-Hanford gravitational wave detector
#!/usr/bin/env python
"""Load, filter, and plot LIGO-Hanford data including optical scattering noise
"""
import glob
import os
import subprocess
from matplotlib import (pyplot, rcParams)
@duncanmmacleod
duncanmmacleod / gw150914-asd.py
Last active April 3, 2019 12:58
Plot the Amplitude Spectral Density of the LIGO strain output around the time of GW150914
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# The MIT License (MIT)
# Copyright (c) 2019 Duncan Macleod
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
@duncanmmacleod
duncanmmacleod / gw150914-animate.py
Created October 25, 2017 12:37
Animate the signal model for GW150914 including highpassed and filtered LIGO data
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# The MIT License (MIT)
# Copyright (c) 2017 Duncan Macleod
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
@duncanmmacleod
duncanmmacleod / gw150914-simple.py
Last active April 3, 2019 10:57
Make a simple plot of the gravitational-wave signal of GW150914 in both LIGO detectors
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# The MIT License (MIT)
# Copyright (c) 2019 Duncan Macleod
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
@duncanmmacleod
duncanmmacleod / gw150914-transparent.py
Last active October 23, 2017 11:42
Plot the gravitational-wave signal of GW150914 in both LIGO detectors, on a transparent background
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# The MIT License (MIT)
# Copyright (c) 2017 Duncan Macleod
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
@duncanmmacleod
duncanmmacleod / PatchCollection.__init__.patch
Created October 4, 2014 18:22
matplotlib.collections.PatchCollection() shouldn't ignore all kwargs if match_original=True
diff --git a/lib/matplotlib/collections.py b/lib/matplotlib/collections.py
index 9e25ca0..5065834 100644
--- a/lib/matplotlib/collections.py
+++ b/lib/matplotlib/collections.py
@@ -1527,21 +1527,13 @@ class PatchCollection(Collection):
return patch.get_facecolor()
return [0, 0, 0, 0]
- facecolors = [determine_facecolor(p) for p in patches]
- edgecolors = [p.get_edgecolor() for p in patches]
From 68260d51a027baa64e88e1f5966dd449883c1cca Mon Sep 17 00:00:00 2001
From: Duncan Macleod <duncanmmacleod@gmail.com>
Date: Mon, 31 Mar 2014 18:48:24 -0500
Subject: [PATCH] Axes.hist: fix bug in weighted log-step hist
- need to weight the minimum by the data for weighted histograms
---
lib/matplotlib/axes/_axes.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)