Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mayank mittal 2018A7ps0375 #18

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions 2018A7ps0375G mayank mittal.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
print(2+0+1+8+7+0+3+7+5)
188 changes: 188 additions & 0 deletions DATASET_CREATION.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,188 @@
{
"nbformat": 4,
"nbformat_minor": 0,
"metadata": {
"colab": {
"name": "DATASET_CREATION.ipynb",
"provenance": [],
"authorship_tag": "ABX9TyNjpeX20P2ml8p5yu4let+2",
"include_colab_link": true
},
"kernelspec": {
"name": "python3",
"display_name": "Python 3"
}
},
"cells": [
{
"cell_type": "markdown",
"metadata": {
"id": "view-in-github",
"colab_type": "text"
},
"source": [
"<a href=\"https://colab.research.google.com/github/Mkmittal/CTEPractice1/blob/master/DATASET_CREATION.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
]
},
{
"cell_type": "code",
"metadata": {
"id": "lFiYDUrViFs1"
},
"source": [
"import pandas as pd\r\n",
"import numpy as np\r\n",
"import math as m"
],
"execution_count": 1,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "yrZ1Sm5miR9g"
},
"source": [
"sample_size = 8192*2\r\n",
"class Gausian_glitch:\r\n",
" def __init__(self,h0,tao,t0):\r\n",
" self.h=[]\r\n",
" self.t_start = t0 - 1 \r\n",
" for i in range(0,sample_size):\r\n",
" t = self.t_start + i*(2/sample_size)\r\n",
" self.h.append(h0*(m.exp(-1*((t-t0)/2*(tao**2)))))"
],
"execution_count": 10,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "6BpgHWPxljbl"
},
"source": [
"class sine_Gaussian_glitch:\r\n",
" def __init__(self,h0,f0,Q,t0):\r\n",
" self.h=[]\r\n",
" self.tao=Q/((2**0.5)*f0*m.pi) \r\n",
" self.t_start = t0 - 1\r\n",
" for i in range(0,sample_size):\r\n",
" t = self.t_start + i*(2/sample_size)\r\n",
" self.h.append(h0*(m.exp(-1*(((t-t0)**2)/2*((tao)**2))))*m.sin(2*m.pi*f0*(t-t0)))"
],
"execution_count": 11,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "5oY-KvWHlj-5"
},
"source": [
"class ring_Down_glitch:\r\n",
" def __init__(self,h0,f0,Q,t0):\r\n",
" self.h=[]\r\n",
" self.tao=Q/((2**0.5)*f0*m.pi) \r\n",
" self.t_start = t0 - 1 \r\n",
" for i in range(0,sample_size):\r\n",
" t = self.t_start + i*(2/sample_size)\r\n",
" if(t>t0):\r\n",
" self.h.append(h0*(m.exp((-1*((t-t0)**2))/(2*tao))*m.sin(2*m.pi*f0*(t-t0))))\r\n",
" else:\r\n",
" self.h.append(0)"
],
"execution_count": 12,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "6_Tat7w_l_-3"
},
"source": [
"class Chirp_like_glitch:\r\n",
" def __init__(self,h0,m1,m2,t0):\r\n",
" self.h = []\r\n",
" self.Mc = ((m1*m2)**(3/5))/((m1+m2)**(1/5)) \r\n",
" self.t_start = t0 - 1 \r\n",
" for i in range(0,sample_size):\r\n",
" t = self.t_start + i*(2/sample_size)\r\n",
" taoc = t-t0\r\n",
" self.hplus.append(h0*(taoc**(-1/4))*m.cos(self.phi(t,taoc)))\r\n",
" self.hcross.append(h0*(taoc**(-1/4))*m.sin(self.phi(t,taoc)))\r\n",
" self.h.append(hcross+hplus)\r\n",
" \r\n",
" def phi(self,t,taoc):\r\n",
" G = 6.673*(10**-11)\r\n",
" return (-2*((5*G*self.Mc)/(c**3))**(-1*(5/8)))*(taoc**(5/8))"
],
"execution_count": 13,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "K_5i5MN8rSd6"
},
"source": [
"class Scattered_light_like_glitch:\r\n",
" def __init__(self,h0,f0,tao,t0):\r\n",
" self.h = []\r\n",
" self.t_start = t0 - 1 \r\n",
" for i in range(0,sample_size):\r\n",
" t = self.t_start + i*(2/sample_size)\r\n",
" self.h.append(h0*m.sin(sel.phiSL(t,t0,f0))*m.exp(-1*(((t-t0)**2)/2*tao)))\r\n",
" \r\n",
" def phiSL(self,t,t0,f0):\r\n",
" k = 0.5\r\n",
" return 2*m.pi*f0*(t-t0)*(1-k*((t - t0)**2))"
],
"execution_count": 14,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "y0z-AgHtu0oG"
},
"source": [
"class Whistle_like_glitch:\r\n",
" def __init__(self,h0,f0,tao,t0):\r\n",
" self.h = []\r\n",
" self.t_start = t0 - 1 \r\n",
" for i in range(0,sample_size):\r\n",
" t = self.t_start + i*(2/sample_size)\r\n",
" self.h.append(h0*m.sin(sel.phiSL(t,t0,f0,tao))*m.exp(-1*(((t-t0)**2)/2*tao)))\r\n",
" \r\n",
" def phiSL(self,t,t0,f0,tao):\r\n",
" k = 3*tao\r\n",
" return 2*m.pi*f0*(t-t0)*(1-k*((t - t0)**2))"
],
"execution_count": 15,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "VvPTlSu7vKbe"
},
"source": [
"#glitch families have been defined above\r\n",
"#gaussian noise data of sensitivity curve of H1 detector is required to be added into h "
],
"execution_count": 16,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "Ku7WE1IawKfo"
},
"source": [
""
],
"execution_count": null,
"outputs": []
}
]
}