Commit 6e25ffa9 authored by Ekaterina Ilin's avatar Ekaterina Ilin
Browse files

notebook added

parent 8e4e35f0
%% Cell type:code id: tags:
``` python
import pandas as pd
import numpy as np
```
%% Cell type:code id: tags:
``` python
df = pd.read_csv("tables/custom_flares.csv", names=["ind","istart","istop",
"cstart","cstop","tstart",
"tstop", "ed_rec","ed_rec_err",
"ampl_rec","totdat","EPIC","C"])
df = df.drop_duplicates()
df.head()
```
%% Output
ind istart istop cstart cstop tstart tstop \
0 0 1756 1759 109386.0 109389.0 2344.083124 2344.144419
1 0 1 5 107553.0 107557.0 2306.631448 2306.713177
2 1 1736 1753 109365.0 109383.0 2343.654036 2344.021806
3 0 652 655 108238.0 108241.0 2320.627412 2320.688708
4 1 698 703 108286.0 108291.0 2321.608144 2321.710304
ed_rec ed_rec_err ampl_rec totdat EPIC C
0 5.962447 0.779509 0.001422 3446.0 211389537 5
1 3.756207 0.484340 0.000605 3446.0 211389716 5
2 18.308052 1.018622 0.000773 3446.0 211389716 5
3 1.791460 0.232721 0.000411 3446.0 211390158 5
4 3.024574 0.290932 0.000441 3446.0 211390158 5
%% Cell type:code id: tags:
``` python
exc = pd.read_csv("tables/exclude.csv")
exc.tail()
```
%% Output
EPIC C why note
45 211955036 5 noise estimate wrong both K2SC fail
46 211027775 4 could be true, check individually NaN
47 212009190 18 gigantic systematic maybe insect TPF
48 211122237 4 could be true, check individually NaN
49 219426848 7 could be true, check individually NaN
%% Cell type:code id: tags:
``` python
fil = df[~df.EPIC.isin(exc.EPIC)]
```
%% Cell type:code id: tags:
``` python
fil.shape, df.shape
```
%% Output
((19171, 13), (22375, 13))
%% Cell type:code id: tags:
``` python
fil.sort_values(by="ind", ascending=False)[((fil.istop-fil.istart > 4) & (fil.ampl_rec >.01))].groupby("C").count()
```
%% Output
/work1/eilin/Flares_in_Clusters_2/RESULTS_Github/flares-in-clusters-with-k2-ii/flaresinclustersii/lib64/python3.6/site-packages/ipykernel_launcher.py:1: UserWarning: Boolean Series key will be reindexed to match DataFrame index.
"""Entry point for launching an IPython kernel.
ind istart istop cstart cstop tstart tstop ed_rec ed_rec_err \
C
4 1460 1460 1460 1460 1460 1460 1460 1460 1460
5 443 443 443 443 443 443 443 443 443
7 23 23 23 23 23 23 23 23 23
13 240 240 240 240 240 240 240 240 240
16 337 337 337 337 337 337 337 337 337
18 352 352 352 352 352 352 352 352 352
ampl_rec totdat EPIC
C
4 1460 1460 1460
5 443 443 443
7 23 23 23
13 240 240 240
16 337 337 337
18 352 352 352
%% Cell type:code id: tags:
``` python
fil[((fil.istop-fil.istart > 4) & (fil.ampl_rec >.01) &(fil.C==7))].EPIC.unique()
```
%% Output
array([219766926, 219789839, 219656722, 219745741, 219619241, 219610232,
219591752])
%% Cell type:code id: tags:
``` python
```
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment