Skip to content
Snippets Groups Projects
Select Git revision
  • 8e6b7827339e2d39fb103d8472d45b09a6179c3b
  • master default protected
2 results

Dynasty_mocktest_complete.ipynb

Blame
  • Forked from Xisco Jimenez Forteza / RDStackingProject
    Source project has a limited visibility.
    RDownScriptalphabeta@tmax.m 6.32 KiB
    (* ::Package:: *)
    
    (************************************************************************)
    (* This file was generated automatically by the Mathematica front end.  *)
    (* It contains Initialization cells from a Notebook file, which         *)
    (* typically will have the same name as this file except ending in      *)
    (* ".nb" instead of ".m".                                               *)
    (*                                                                      *)
    (* This file is intended to be loaded into the Mathematica kernel using *)
    (* the package loading commands Get or Needs.  Doing so is equivalent   *)
    (* to using the Evaluate Initialization Cells menu command in the front *)
    (* end.                                                                 *)
    (*                                                                      *)
    (* DO NOT EDIT THIS FILE.  This entire file is regenerated              *)
    (* automatically each time the parent Notebook file is saved in the     *)
    (* Mathematica front end.  Any changes you make to this file will be    *)
    (* overwritten.                                                         *)
    (************************************************************************)
    
    
    
    rootpath="~/git/rdstackingproject/";
    
    
    SetDirectory[rootpath<>"code"];
    <<RDown.m
    <<mcmc.m
    
    
    SetOptions[InputNotebook[], AutoGeneratedPackage -> Automatic]
    
    
    mysxscase=rootpath<>"/SXS/BBH_SKS_d14.3_q1.22_sA_0_0_0.330_sB_0_0_-0.440";
    ntones=2;
    tshift=12;
    npoints=37000;
    (*n=1:19, n=2:12, n=3:8, n=4:5, n=5:3, n=6:1, n=7:0 (not sure; is that really a minimum???) *)
    allspectrum = {x0,x1,x2,x3,x4,x5,x6,x7};
    allalphas = {\[Alpha]1,\[Alpha]2,\[Alpha]3,\[Alpha]4,\[Alpha]5,\[Alpha]6,\[Alpha]7};
    allbetas = {\[Beta]1,\[Beta]2,\[Beta]3,\[Beta]4,\[Beta]5,\[Beta]6,\[Beta]7};
    spectrum = allspectrum[[;;ntones+1]]
    alphas = allalphas[[;;ntones]]
    betas = allbetas[[;;ntones]]
    \[Omega]fact=0.1;
    \[Tau]fact=0.1;
    params = {tshift, ntones, \[Omega]fact, \[Tau]fact}
    
    
    (* Change them accordingly *)
    (*Notebook directory*)
    notdir=rootpath<>"code/";
    (*Directory of the l's Ringdown data *)
    modedir=rootpath;
    (* True if you want to export the plots *)
    ExportQ=False
    ExportDir=notdir
    
    
    (* PlotStyle *)
    markers={"\[FilledCircle]","\[FilledSquare]","\[FilledDiamond]","\[FilledUpTriangle]","\[FilledDownTriangle]","\[EmptyCircle]","\[EmptySquare]","\[EmptyDiamond]","\[EmptyUpTriangle]","\[EmptyDownTriangle]"}
    colors=ColorData[97,"ColorList"]
    l1=.025;
    l2=.001;
    s=l1/2;
    
    
    Options[pdf]={"SNR"->1};
    pdf[ansatz_,data_,tend_?NumericQ,x_?(VectorQ[#,NumericQ]&),OptionsPattern[]]:=Block[{ansl,cfit,cfitd,h1red,h2red,norm1,norm2,myTable,snr,tmax},
    
    snr=OptionValue["SNR"];