This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class uneven_FFT_recon(object): | |
""" | |
A class to wrap up dealing with the irregularly sampled periodic | |
data | |
""" | |
@classmethod | |
def reconstruct_iterative(cls, phi, h, target_error, | |
start_N=3, bound_N=15, iters=25): | |
""" | |
reconstruct a band-limited a curve from unevenly |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import matplotlib.pyplot as plt | |
from itertools import cycle | |
from six.moves import zip | |
def stack_bar(ax, list_of_vals, color_cyle=None, **kwargs): | |
""" | |
Generalized stacked bar graph. | |
kwargs are passed through to the call to `bar` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# this bit of code makes sure that the head stays a fixed size in terms of | |
# axes fractions. To tune this size change `head_size` | |
head_size = 30 | |
# to tun the ratio between the head size and the shaft, change `ascale` | |
ascale = .2 | |
# tunes how 'pinched' the arrow head is, < 1 and the bottom will be indented | |
# > 1 the arrow will be a distorted diamond | |
pinched = .7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from collections import Mapping | |
import six | |
_XRAYLIB_MAP_MAP = {'edges': ({'Ka1': xraylib.KALPHA,..}, xraylib.CS_FlourLine), | |
'levels': ({'K': xraylib.K, }), | |
} | |
_OTHER_VALUES = {'H': {'Z': 1, 'rho': .524, }, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from vistrails import api | |
csv = api.add_module(100, 100, 'org.vistrails.vistrails.tabledata', 'CSVFile', 'read') | |
fd = api.add_module(65, 50, 'org.vistrails.vistrails.url', 'DownloadFile', '') | |
api.add_connection(fd.id, 'file', csv.id, 'file') | |
api.change_parameter(fd.id, 'url',['http://www.vistrails.org/download/download.php?type=DATA&id=citibike_from_launch.csv']) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
channels: | |
- tacaswell | |
- defaults |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
from datetime import datetime, timedelta | |
dt = timedelta(seconds=1) | |
base_time = datetime(2014, 9, 24, 10, 5, 30) | |
indx1 = [base_time + j * dt for j in range(0, 10)] | |
indx2 = [base_time + j * dt for j in range(0, 10, 2)] | |
ds1 = pd.Series(5, index=indx1) |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
OlderNewer