for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
""" Flare analysis """
import logging
import numpy as np
import scipy as sp
import pandas as pd
import matplotlib as mplt
import matplotlib.pyplot as plt
import sys
sys
import os
os
import glob
glob
import re
re
from datetime import datetime
from astropy.stats import bayesian_blocks
import warnings
warnings
from mutis import Signal
#from mutis.flares.bayblocks import BayesianBlocks
import mutis.flares.bayblocks as bayblocks
log = logging.getLogger(__name__)
class Flare:
"""Container class for a Flare object
Attributes
----------
tstart: float
time at which the flare starts
tstop: float
time at which the flare ends
"""
def __init__(self, tstart, tstop):
self.tstart = tstart
self.tstop = tstop
def __repr__(self):
return f"Flare({self.tstart},{self.tstop})"
def __str__(self):
return self.__repr__()
def plot(self, ax=None, **kwargs):
This check looks for invalid names for a range of different identifiers.
You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.
If your project includes a Pylint configuration file, the settings contained in that file take precedence.
To find out more about Pylint, please refer to their site.
"""Plots the flare as a colored area """
ax = plt.gca() if ax is None else ax
ax.axvspan(self.tstart, self.tstop, facecolor='r', edgecolor=None, alpha=0.2, **kwargs)
pass