This file contains hidden or 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 QSeries(pd.Series): | |
_metadata = ["unit", "descriptor"] | |
@property | |
def _constructor(self): | |
return QSeries | |
@property | |
def _constructor_expanddim(self): | |
return QDataFrame |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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
#### implementation 1 #### | |
class GenericModel(object): | |
def __init__(self, *args): | |
for property in args: | |
self.cells_property = {some dictionary containing each cell property} | |
# example | |
self.cells_property = {'velocity':Velocity(asdasd)} | |
self.__dict__[property.name] = property | |
This file contains hidden or 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
#!/bin/bash | |
#SBATCH --job-name=dalek-jobarray | |
#SBATCH --nodes=1 | |
#SBATCH --cpus-per-task=20 | |
#SBATCH --mem=40GB | |
#SBATCH --time=02:00:00 | |
#SBATCH --array=0-300 | |
### ACTIVATING CONDA #### |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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 OrderedDict | |
from astropy import units as u | |
import numpy as np | |
import pandas as pd | |
def read_cmfgen(fname): | |
nu = [] | |
flux = [] | |
current_data = nu |
This file contains hidden or 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 OrderedDict | |
from astropy import units as u | |
import numpy as np | |
import pandas as pd | |
def read_cmfgen(fname): | |
nu = [] | |
flux = [] | |
current_data = nu |
This file contains hidden or 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 luigi | |
from glob import glob | |
import os | |
raw_zips = '/1002/*.gz' | |
class ExtractGZ(luigi.Task): | |
document_id = luigi.Parameter() | |
def output(self): |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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 astropy import wcs | |
from scipy import optimize | |
# this doesn't include the precise function names - just look them up on the astropy wcs website | |
def fit_func(crval1, crval2, x, y, ra, dec): | |
w = wcs.WCS(naxis=2) | |
w.wcs.crval = [crval1, crval2] | |
ra_wcs, dec_wcs = w.pix_to_world(x, y) | |
return (ra_wcs - ra)**2 + (dec_wcs - dec)**2 | |
NewerOlder