https://github.com/pthomaslab/Lineage-tree-correlation-pattern-inference
Raw File
Tip revision: dc69bbce5ce909813d7d4356c9fd2da045e02c79 authored by fernhughes on 28 September 2022, 13:04:21 UTC
Update README.md
Tip revision: dc69bbc
imm_output_analysis.nb
(* Content-type: application/vnd.wolfram.mathematica *)

(*** Wolfram Notebook File ***)
(* http://www.wolfram.com/nb *)

(* CreatedBy='Mathematica 12.0' *)

(*CacheID: 234*)
(* Internal cache information:
NotebookFileLineBreakTest
NotebookFileLineBreakTest
NotebookDataPosition[       158,          7]
NotebookDataLength[    118881,       2833]
NotebookOptionsPosition[    108881,       2692]
NotebookOutlinePosition[    109544,       2714]
CellTagsIndexPosition[    109501,       2711]
WindowFrame->Normal*)

(* Beginning of Notebook Content *)
Notebook[{

Cell[CellGroupData[{
Cell["Inheritance matrix model - output analysis", "Chapter",
 CellChangeTimes->{{3.8636054848288555`*^9, 
  3.863605489949916*^9}},ExpressionUUID->"de06434e-4e49-4105-ad70-\
e674389f6d6b"],

Cell["\<\
Must run \[OpenCurlyQuote]Run analysis\[CloseCurlyQuote] section first, then \
\[OpenCurlyQuote]Plots\[CloseCurlyQuote] to show output\
\>", "Text",
 CellChangeTimes->{{3.863605501080866*^9, 
  3.8636055126549683`*^9}},ExpressionUUID->"8b336b89-fdbc-4751-96b0-\
ed715eb3901c"],

Cell[CellGroupData[{

Cell["Run analysis", "Section",
 CellChangeTimes->{{3.828161344536274*^9, 3.8281613458217773`*^9}, {
  3.8636048746519847`*^9, 
  3.8636048888271475`*^9}},ExpressionUUID->"ec4e3fd9-f150-4b56-83e9-\
796278e6a4b3"],

Cell[CellGroupData[{

Cell["Load files, set options", "Subsubsection",
 CellChangeTimes->{{3.8636049708413105`*^9, 
  3.8636049751229215`*^9}},ExpressionUUID->"64941a6c-75ce-4bfa-935a-\
c9e405e9c6fb"],

Cell["Set options", "Text",
 CellChangeTimes->{{3.8636050026229506`*^9, 
  3.8636050039186525`*^9}},ExpressionUUID->"a184baad-9ddd-41ea-b343-\
a2ab2f0406d9"],

Cell[BoxData[{
 RowBox[{"SetOptions", "[", 
  RowBox[{
   RowBox[{"EvaluationNotebook", "[", "]"}], ",", 
   RowBox[{"StyleDefinitions", "\[Rule]", 
    RowBox[{"Notebook", "[", 
     RowBox[{
      RowBox[{"{", 
       RowBox[{
        RowBox[{"Cell", "[", 
         RowBox[{"StyleData", "[", 
          RowBox[{"StyleDefinitions", "\[Rule]", "\"\<Default.nb\>\""}], 
          "]"}], "]"}], ",", 
        RowBox[{"Cell", "[", 
         RowBox[{
          RowBox[{"StyleData", "[", 
           RowBox[{"\"\<Graphics\>\"", ",", "All"}], "]"}], ",", 
          RowBox[{"FontFamily", "\[Rule]", "\"\<Carlito\>\""}]}], "]"}]}], 
       "}"}], ",", 
      RowBox[{
      "StyleDefinitions", "\[Rule]", 
       "\"\<PrivateStylesheetFormatting.nb\>\""}]}], "]"}]}]}], 
  "]"}], "\[IndentingNewLine]", 
 RowBox[{"SetOptions", "[", 
  RowBox[{"$FrontEndSession", ",", 
   RowBox[{"PrintingStyleEnvironment", "\[Rule]", "\"\<Working\>\""}]}], 
  "]"}]}], "Input",
 CellChangeTimes->{{3.829019180943429*^9, 3.8290191854611454`*^9}, {
  3.8290194882069464`*^9, 3.829019500511959*^9}, {3.8290195332611723`*^9, 
  3.8290195337436123`*^9}, {3.829020504831401*^9, 3.829020505050252*^9}, {
  3.8376680844681854`*^9, 3.83766809378654*^9}, {3.837668292317487*^9, 
  3.8376682933092937`*^9}},
 CellLabel->"In[1]:=",ExpressionUUID->"2e7218bd-fba5-434b-a792-189f3cb9df02"],

Cell["Set directories, get model output", "Text",
 CellChangeTimes->{{3.8227313192067404`*^9, 
  3.8227313333829117`*^9}},ExpressionUUID->"2cf69406-9e10-4309-b10f-\
3d172858d418"],

Cell[BoxData[{
 RowBox[{
  RowBox[{"Get", "[", 
   RowBox[{
    RowBox[{"NotebookDirectory", "[", "]"}], "<>", 
    "\"\<inheritance_matrix_model_setup.mx\>\""}], "]"}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"nbdir", " ", "=", " ", 
   RowBox[{"NotebookDirectory", "[", "]"}]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"plotdir", " ", "=", " ", 
   RowBox[{"nbdir", "<>", "\"\<WM_plots\\\\\>\""}]}], ";"}]}], "Input",
 CellChangeTimes->{{3.822548883388788*^9, 3.8225488859491463`*^9}, {
  3.8225489938506145`*^9, 3.8225489974662533`*^9}, {3.822550357989214*^9, 
  3.822550361049867*^9}, {3.8225505112766385`*^9, 3.822550511910158*^9}, {
  3.8225509978896585`*^9, 3.822551014682534*^9}, {3.8635150286614475`*^9, 
  3.8635150292599964`*^9}, {3.8635151066882153`*^9, 3.8635151483961024`*^9}, {
  3.8636119374541464`*^9, 3.863611968152103*^9}},
 CellLabel->"In[3]:=",ExpressionUUID->"37d629f3-245f-4e67-99b0-beea3d958720"],

Cell["Set dataset name", "Text",
 CellChangeTimes->{{3.822731340952752*^9, 
  3.822731343663668*^9}},ExpressionUUID->"e558c4ef-6017-4e68-a358-\
0dffa4233389"],

Cell[BoxData[{
 RowBox[{
  RowBox[{"dataset", " ", "=", " ", 
   RowBox[{"InputString", "[", "\"\<Name of dataset\>\"", "]"}]}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"choice", " ", "=", 
   RowBox[{
   "InputString", "[", "\"\<What did you choose to measure\>\"", "]"}]}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"steps", " ", "=", " ", 
   RowBox[{"InputString", "[", "\"\<Number of steps\>\"", "]"}]}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"titlename", " ", "=", " ", 
   RowBox[{"InputString", "[", "\"\<Dataset title\>\"", "]"}]}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"name", " ", "=", " ", 
   RowBox[{"dataset", "<>", "\"\<_\>\"", "<>", "steps"}]}], ";"}]}], "Input",
 CellChangeTimes->{{3.822548905218008*^9, 3.8225489184154644`*^9}, {
  3.8225496483098745`*^9, 3.8225496586886425`*^9}, {3.8636072076616745`*^9, 
  3.863607219571023*^9}},
 CellLabel->"In[6]:=",ExpressionUUID->"0242d7d0-01b8-4d18-ac88-7a9f4e6a3a55"],

Cell["Read output file", "Text",
 CellChangeTimes->{{3.823170339448922*^9, 
  3.8231703415438366`*^9}},ExpressionUUID->"59dfffac-9708-4def-a908-\
f089bf0e6491"],

Cell[BoxData[
 RowBox[{
  RowBox[{"outputfile", " ", "=", " ", 
   RowBox[{
    RowBox[{"Import", "[", 
     RowBox[{
      RowBox[{"nbdir", "<>", "name", "<>", "\"\<_output_thin.txt\>\""}], ",", 
      "\"\<Table\>\""}], "]"}], "[", 
    RowBox[{"[", 
     RowBox[{";;", ",", ";;"}], "]"}], "]"}]}], ";"}]], "Input",
 CellChangeTimes->{{3.8225489315003405`*^9, 3.8225489714968133`*^9}, {
   3.8225490395771165`*^9, 3.82254905107917*^9}, {3.8225496648415437`*^9, 
   3.822549665124917*^9}, {3.8225498190538445`*^9, 3.822549828843111*^9}, {
   3.822551600717965*^9, 3.8225516027618604`*^9}, {3.82272207377212*^9, 
   3.8227221050522103`*^9}, {3.8230614457424507`*^9, 3.823061448349779*^9}, {
   3.8274016008819757`*^9, 3.8274016009965596`*^9}, {3.82747647509761*^9, 
   3.8274764769311104`*^9}, {3.856607920068493*^9, 3.8566079257096786`*^9}, {
   3.8566096471305327`*^9, 3.856609648037887*^9}, 3.8635151067084055`*^9},
 CellLabel->"In[11]:=",ExpressionUUID->"0c4c688d-ab2b-4ec9-8d6b-710648e7b031"],

Cell["Read route distribution file", "Text",
 CellChangeTimes->{{3.8227313724460635`*^9, 
  3.8227313765849333`*^9}},ExpressionUUID->"4ad1c131-e91f-457c-bf57-\
5318ff175b1c"],

Cell[BoxData[
 RowBox[{
  RowBox[{"patterndist", " ", "=", " ", 
   RowBox[{"Round", "[", " ", 
    RowBox[{
     RowBox[{"Flatten", "[", 
      RowBox[{
       RowBox[{"Import", "[", 
        RowBox[{
         RowBox[{"nbdir", "<>", "name", "<>", "\"\<_pattern_dist.txt\>\""}], 
         ",", "\"\<Table\>\""}], "]"}], "[", 
       RowBox[{"[", 
        RowBox[{";;", ",", ";;"}], "]"}], "]"}], "]"}], ",", "0.01"}], 
    "]"}]}], ";"}]], "Input",
 CellChangeTimes->{{3.8227221752005625`*^9, 3.822722186009081*^9}, {
   3.822722667544632*^9, 3.8227226708497252`*^9}, {3.8227313847244225`*^9, 
   3.822731397131559*^9}, {3.823686161874159*^9, 3.8236861643434668`*^9}, {
   3.823689297973551*^9, 3.823689413975663*^9}, {3.8236894593688416`*^9, 
   3.8236894662433233`*^9}, 3.8635151067296643`*^9, {3.863605177778504*^9, 
   3.8636051843785405`*^9}, {3.8644404354412584`*^9, 3.864440435443286*^9}},
 CellLabel->"In[12]:=",ExpressionUUID->"3ba888ac-0b69-418e-9957-0a4f9e57b641"],

Cell["Split output file into routes", "Text",
 CellChangeTimes->{{3.822634644642798*^9, 3.8226346492825737`*^9}, {
  3.8227314026106386`*^9, 
  3.822731411890379*^9}},ExpressionUUID->"bd26b7d1-a283-4d16-b881-\
768f2fa55654"],

Cell[BoxData[{
 RowBox[{
  RowBox[{"r1out", " ", "=", " ", 
   RowBox[{"outputfile", "[", 
    RowBox[{"[", 
     RowBox[{
      RowBox[{"Flatten", "[", 
       RowBox[{"Position", "[", 
        RowBox[{
         RowBox[{"outputfile", "[", 
          RowBox[{"[", 
           RowBox[{";;", ",", "20"}], "]"}], "]"}], ",", "1.0"}], "]"}], 
       "]"}], ",", ";;"}], "]"}], "]"}]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"r2out", " ", "=", " ", 
   RowBox[{"outputfile", "[", 
    RowBox[{"[", 
     RowBox[{
      RowBox[{"Flatten", "[", 
       RowBox[{"Position", "[", 
        RowBox[{
         RowBox[{"outputfile", "[", 
          RowBox[{"[", 
           RowBox[{";;", ",", "21"}], "]"}], "]"}], ",", "1.0"}], "]"}], 
       "]"}], ",", ";;"}], "]"}], "]"}]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"r3out", " ", "=", " ", 
   RowBox[{"outputfile", "[", 
    RowBox[{"[", 
     RowBox[{
      RowBox[{"Flatten", "[", 
       RowBox[{"Position", "[", 
        RowBox[{
         RowBox[{"outputfile", "[", 
          RowBox[{"[", 
           RowBox[{";;", ",", "22"}], "]"}], "]"}], ",", "1.0"}], "]"}], 
       "]"}], ",", ";;"}], "]"}], "]"}]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"r23out", " ", "=", " ", 
   RowBox[{"ArrayFlatten", "[", 
    RowBox[{"{", 
     RowBox[{
      RowBox[{"{", "r2out", "}"}], ",", 
      RowBox[{"{", "r3out", "}"}]}], "}"}], "]"}]}], ";"}]}], "Input",
 CellChangeTimes->{{3.8225517001906013`*^9, 3.822551712428362*^9}, {
  3.8225517711183558`*^9, 3.822551815808462*^9}, {3.822551850113062*^9, 
  3.8225518793157687`*^9}, {3.822558518915099*^9, 3.822558521136042*^9}, {
  3.8227314785053883`*^9, 3.8227315196390715`*^9}, {3.8231705573875446`*^9, 
  3.8231706026221952`*^9}, {3.827401535124582*^9, 3.8274015388570943`*^9}},
 CellLabel->"In[13]:=",ExpressionUUID->"c77e8e03-ae86-4f5b-9108-4f9726544be2"],

Cell["\<\
Get correlation coefficients from data, and inference of correlation \
coefficients for whole inference\
\>", "Text",
 CellChangeTimes->{{3.822733254797844*^9, 3.8227332693520455`*^9}, 
   3.82273337399434*^9},ExpressionUUID->"48fc439d-6c45-4f0a-9900-\
12dd5fe2d1e5"],

Cell[BoxData[
 RowBox[{
  RowBox[{"corrfile", " ", "=", " ", 
   RowBox[{
    RowBox[{"Import", "[", 
     RowBox[{
      RowBox[{
      "nbdir", "<>", "dataset", "<>", "\"\<_\>\"", "<>", "choice", "<>", 
       "\"\<_corrs.txt\>\""}], ",", "\"\<Table\>\""}], "]"}], "[", 
    RowBox[{"[", 
     RowBox[{";;", ",", ";;"}], "]"}], "]"}]}], ";"}]], "Input",
 CellChangeTimes->{{3.8225495695213385`*^9, 3.82254957603013*^9}, {
   3.8225496102976007`*^9, 3.8225497068086915`*^9}, {3.8225499090625286`*^9, 
   3.8225499164962983`*^9}, {3.8225500806945148`*^9, 3.822550091072257*^9}, {
   3.822733308703778*^9, 3.8227333245938234`*^9}, {3.827401270485745*^9, 
   3.827401270919734*^9}, {3.8635149523303432`*^9, 3.863514958952302*^9}, {
   3.863515023001598*^9, 3.863515039025259*^9}, 3.863515106740506*^9, {
   3.8636049797949653`*^9, 3.863604982051159*^9}, {3.8636072279286947`*^9, 
   3.863607235477765*^9}},
 CellLabel->"In[17]:=",ExpressionUUID->"8881108b-4d69-4a9a-a7ae-03fb84a13cc1"],

Cell[BoxData[
 RowBox[{
  RowBox[{"corrdata", " ", "=", " ", 
   RowBox[{"Table", "[", 
    RowBox[{
     RowBox[{"Around", "[", 
      RowBox[{
       RowBox[{"corrfile", "[", 
        RowBox[{"[", 
         RowBox[{"s", " ", ",", " ", "1"}], "]"}], "]"}], ",", 
       RowBox[{"corrfile", "[", 
        RowBox[{"[", 
         RowBox[{"s", ",", 
          RowBox[{"{", 
           RowBox[{"2", ",", "3"}], "}"}]}], "]"}], "]"}]}], " ", "]"}], " ", 
     ",", " ", 
     RowBox[{"{", 
      RowBox[{"s", " ", ",", 
       RowBox[{"Range", "[", 
        RowBox[{"3", ",", 
         RowBox[{"Length", "[", "corrfile", "]"}]}], "]"}]}], "}"}]}], " ", 
    "]"}]}], ";"}]], "Input",
 CellLabel->"In[18]:=",ExpressionUUID->"dbcdab71-a391-47f0-a2dd-9a48f4a01185"],

Cell[BoxData[
 RowBox[{
  RowBox[{"corrdata", " ", "=", " ", 
   RowBox[{"corrdata", "[", 
    RowBox[{"[", 
     RowBox[{"{", 
      RowBox[{"1", ",", "4", ",", "5", ",", "6", ",", "2", ",", "3"}], "}"}], 
     "]"}], "]"}]}], ";"}]], "Input",
 CellChangeTimes->{{3.827402404874668*^9, 3.827402413247594*^9}, {
  3.827402552487274*^9, 3.827402555114684*^9}},
 CellLabel->"In[19]:=",ExpressionUUID->"60a7f7ee-b4a0-4428-b2bb-2745524c54c5"],

Cell[BoxData[{
 RowBox[{
  RowBox[{"corrdata", " ", "=", " ", 
   RowBox[{"corrdata", "/.", 
    RowBox[{"\"\<NaN\>\"", "\[Rule]", 
     RowBox[{"Sequence", "[", "]"}]}]}]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"corrdata", " ", "=", " ", 
   RowBox[{"corrdata", "/.", 
    RowBox[{
     RowBox[{"{", "}"}], "\[Rule]", 
     RowBox[{"Sequence", "[", "]"}]}]}]}], ";"}]}], "Input",
 CellLabel->"In[20]:=",ExpressionUUID->"7d2c7586-df09-49e9-ae34-61061f649db2"],

Cell["Get maximum posterior parameters", "Text",
 CellChangeTimes->{{3.8636050119899654`*^9, 
  3.8636050216961465`*^9}},ExpressionUUID->"1b701453-210b-41e7-a5ed-\
1b2098ee26a6"],

Cell[BoxData[{
 RowBox[{
  RowBox[{"mlpfile", " ", "=", " ", 
   RowBox[{"Flatten", "[", 
    RowBox[{
     RowBox[{"Import", "[", 
      RowBox[{
       RowBox[{"nbdir", "<>", "name", "<>", "\"\<_mlp.txt\>\""}], ",", 
       "\"\<Table\>\""}], "]"}], "[", 
     RowBox[{"[", 
      RowBox[{";;", ",", ";;"}], "]"}], "]"}], "]"}]}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"mlpfit", " ", "=", " ", 
   RowBox[{"Table", "[", 
    RowBox[{
     RowBox[{
      RowBox[{"paras", "[", 
       RowBox[{"[", "s", "]"}], "]"}], "\[Rule]", 
      RowBox[{"mlpfile", "[", 
       RowBox[{"[", "s", "]"}], "]"}]}], ",", 
     RowBox[{"{", 
      RowBox[{"s", ",", "1", ",", 
       RowBox[{"Length", "[", "paras", "]"}]}], "}"}]}], "]"}]}], 
  ";"}]}], "Input",
 CellChangeTimes->{{3.822550803055174*^9, 3.8225508896266975`*^9}, {
   3.8226350158535304`*^9, 3.8226350172473583`*^9}, {3.8635150508306713`*^9, 
   3.863515052817628*^9}, 3.863515106750519*^9},
 CellLabel->"In[22]:=",ExpressionUUID->"5a748923-e94b-4c58-b77a-f291bd9800de"],

Cell["Get mean interdivision time", "Text",
 CellChangeTimes->{{3.8636050251179066`*^9, 
  3.863605028966867*^9}},ExpressionUUID->"821eda9f-823d-4c12-bfdc-\
d963bd3b5cbe"],

Cell[BoxData[
 RowBox[{
  RowBox[{"\[Mu]ccd", " ", "=", " ", 
   RowBox[{"corrfile", "[", 
    RowBox[{"[", 
     RowBox[{"1", ",", "1"}], "]"}], "]"}]}], ";"}]], "Input",
 CellChangeTimes->{{3.829371180854781*^9, 3.8293711963754125`*^9}},
 CellLabel->"In[24]:=",ExpressionUUID->"01190e2d-dc27-403c-b801-d95af7a32af6"],

Cell["Set default plot size, padding", "Text",
 CellChangeTimes->{{3.8636050573125944`*^9, 
  3.863605063265294*^9}},ExpressionUUID->"6a334f50-69f9-4b72-ac59-\
3be15e4b00ad"],

Cell[BoxData[
 RowBox[{
  RowBox[{"imagesize", " ", "=", " ", "500"}], ";"}]], "Input",
 CellChangeTimes->{{3.842676099890457*^9, 3.842676106479146*^9}, {
  3.8426764337260313`*^9, 3.842676433919168*^9}, {3.8426764798093596`*^9, 
  3.842676480047262*^9}},
 CellLabel->"In[25]:=",ExpressionUUID->"ffdf8b67-a63a-4486-9e29-c2a299836361"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"padding", " ", "=", " ", 
  RowBox[{"{", 
   RowBox[{
    RowBox[{"{", 
     RowBox[{"100", ",", "10"}], "}"}], ",", 
    RowBox[{"{", 
     RowBox[{"140", ",", "80"}], "}"}]}], "}"}]}]], "Input",
 CellChangeTimes->{{3.8425134409554214`*^9, 3.84251346575574*^9}, {
  3.842513559721179*^9, 3.842513559806081*^9}},
 CellLabel->"In[26]:=",ExpressionUUID->"c4c15abf-c22d-44c0-a9fa-28faf246fdc0"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{
   RowBox[{"{", 
    RowBox[{"100", ",", "10"}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{"140", ",", "80"}], "}"}]}], "}"}]], "Output",
 CellChangeTimes->{
  3.8425134669760103`*^9, 3.8425135602386265`*^9, 3.8425136025790052`*^9, 
   3.8425138669748363`*^9, 3.8425141025798864`*^9, 3.842514135419323*^9, 
   3.8425155868489637`*^9, 3.842515829302728*^9, 3.842517001208495*^9, 
   3.8425173954840775`*^9, 3.8425177706762943`*^9, 3.8425179907369585`*^9, 
   3.842522045707019*^9, 3.842522263531659*^9, 3.8425223813474784`*^9, 
   3.8425231301959267`*^9, 3.8426761813676453`*^9, 3.8426811446980333`*^9, 
   3.84311871751655*^9, 3.843118764593849*^9, 3.843119203567648*^9, 
   3.8431194797313523`*^9, 3.8431269251208315`*^9, 3.8431272766621447`*^9, 
   3.8431280123805084`*^9, 3.843128180159565*^9, 3.843128370656515*^9, 
   3.8431285909559965`*^9, 3.843128838899625*^9, 3.84312902205177*^9, 
   3.843548412424958*^9, 3.8435535403758545`*^9, 3.843553685588129*^9, 
   3.8435541663631134`*^9, 3.843554356745716*^9, 3.8435555720106225`*^9, 
   3.8437295998949413`*^9, 3.8437296461909676`*^9, 3.8437953505496397`*^9, 
   3.8438159966888123`*^9, 3.8438167316852627`*^9, 3.8438170885273085`*^9, 
   3.8438842313554573`*^9, 3.843885767318061*^9, 3.8438858199556026`*^9, 
   3.843894125587229*^9, 3.843908550354843*^9, 3.8451910241215024`*^9, 
   3.8451918056707387`*^9, 3.845194297413149*^9, 3.8456179227297964`*^9, 
   3.8456195176106186`*^9, 3.8456198287871046`*^9, 3.8463272543374104`*^9, 
   3.846558786982231*^9, 3.8465600017726665`*^9, 3.8465613463434563`*^9, 
   3.8465620236869135`*^9, 3.846562311946167*^9, 3.8465629531003714`*^9, 
   3.8465632772823396`*^9, 3.846563588595379*^9, 3.8465639582565503`*^9, 
   3.8467325544768963`*^9, 3.8467328891306987`*^9, 3.8467330097699585`*^9, 
   3.8467330594647684`*^9, 3.8467331678607035`*^9, 3.8467332686575356`*^9, 
   3.846733322233225*^9, 3.846733829185356*^9, 3.8467338751180053`*^9, 
   3.8467340255619617`*^9, 3.846734164634078*^9, 3.8467343448467197`*^9, 
   3.84673439519911*^9, 3.846734436775509*^9, 3.8474423677058315`*^9, 
   3.8474470616758523`*^9, 3.847515893257081*^9, 3.847516229223933*^9, 
   3.8475166123916845`*^9, 3.8480627784787264`*^9, 3.8511507367519574`*^9, 
   3.851150862702585*^9, 3.8511532846441374`*^9, 3.851165647053694*^9, 
   3.8553080857245364`*^9, 3.8553082381191225`*^9, 3.8563282064907007`*^9, 
   3.85632905944663*^9, 3.856436051747796*^9, 3.8564899399797697`*^9, 
   3.8565028453731227`*^9, 3.8566073326392136`*^9, 3.857025791507599*^9, 
   3.857028127453142*^9, 3.857044367501483*^9, 3.8570451497825775`*^9, 
   3.8570452680865316`*^9, 3.857045391424802*^9, 3.857045674361336*^9, 
   3.857046001598702*^9, 3.8570461842111673`*^9, 3.8594367780913515`*^9, 
   3.859441439984272*^9, 3.859441901520851*^9, 3.8594531948101983`*^9, 
   3.8610723926604595`*^9, 3.8610733179723263`*^9, 3.8610744947830887`*^9, 
   3.861075280083254*^9, 3.861075626163467*^9, 3.8610772620774508`*^9, 
   3.861077765931081*^9, 3.8610779232491703`*^9, 3.8610797109914865`*^9, 
   3.8611623506821127`*^9, 3.8611827032984405`*^9, 3.861190264648714*^9, 
   3.8611919265569615`*^9, 3.863515012508193*^9, 3.8635151585718036`*^9, 
   3.8635163466341276`*^9, 3.863516513595319*^9, 3.8636046614281435`*^9, 
   3.8636047337491093`*^9, 3.8636048020867524`*^9, 3.863605399438764*^9, 
   3.863611820490851*^9, {3.8636119612903423`*^9, 3.863611989369762*^9}, 
   3.864123471114114*^9, {3.8641235773608475`*^9, 3.8641236008593903`*^9}, 
   3.864440920183619*^9},
 CellLabel->"Out[26]=",ExpressionUUID->"c5087a29-d02e-44f7-8dab-4250d7e7be99"]
}, Open  ]],

Cell["Custom colours", "Text",
 CellChangeTimes->{{3.86360506946603*^9, 
  3.8636050744816008`*^9}},ExpressionUUID->"873c8c7b-d3ca-4a1f-93aa-\
a250ade54939"],

Cell[BoxData[
 RowBox[{
  RowBox[{"crs", "=", 
   RowBox[{"(", 
    RowBox[{
     RowBox[{"(", 
      RowBox[{"\"\<DefaultPlotStyle\>\"", "/.", 
       RowBox[{"(", 
        RowBox[{"Method", "/.", 
         RowBox[{"Charting`ResolvePlotTheme", "[", 
          RowBox[{"\"\<Web\>\"", ",", "ListLinePlot"}], "]"}]}], ")"}]}], 
      ")"}], "/.", 
     RowBox[{
      RowBox[{"Directive", "[", 
       RowBox[{"x_", ",", "__"}], "]"}], "\[RuleDelayed]", "x"}]}], ")"}]}], 
  ";"}]], "Input",
 CellLabel->"In[27]:=",ExpressionUUID->"e46fa090-9fb6-4819-b406-907200da5aa6"],

Cell[CellGroupData[{

Cell[BoxData[{
 RowBox[{
  RowBox[{"fblue", " ", "=", " ", 
   RowBox[{"RGBColor", "[", "\"\<#004488\>\"", "]"}]}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"fred", " ", "=", " ", 
   RowBox[{"RGBColor", "[", "\"\<#BB5566\>\"", "]"}]}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"fyellow", " ", "=", " ", 
   RowBox[{"RGBColor", "[", "\"\<#DDaa33\>\"", "]"}]}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"forange", " ", "=", " ", 
   RowBox[{"RGBColor", "[", "\"\<#E66000\>\"", "]"}]}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"fpurple", " ", "=", " ", 
   RowBox[{"RGBColor", "[", "\"\<#5E3A9B\>\"", "]"}]}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"fgreen", " ", "=", " ", 
   RowBox[{"RGBColor", "[", "\"\<#4C9459\>\"", "]"}]}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"fteal", " ", "=", " ", 
   RowBox[{"crs", "[", 
    RowBox[{"[", "6", "]"}], "]"}]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"fpink", " ", "=", " ", 
   RowBox[{"crs", "[", 
    RowBox[{"[", "1", "]"}], "]"}]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{"{", 
  RowBox[{
  "fblue", ",", "fred", ",", "fyellow", ",", "forange", ",", "fpurple", ",", 
   "fgreen", ",", "fteal", ",", "fpink"}], "}"}]}], "Input",
 CellChangeTimes->{{3.824190614921374*^9, 3.824190700583828*^9}, {
   3.8241910612258635`*^9, 3.824191103084755*^9}, 3.82419157406223*^9, {
   3.8272912056642723`*^9, 3.8272912267036076`*^9}, 3.827291746057971*^9, 
   3.827291817235817*^9, {3.827291880656884*^9, 3.8272919006056147`*^9}, {
   3.8564904912266965`*^9, 3.856490504167776*^9}, {3.856493420642993*^9, 
   3.856493431116251*^9}, {3.856493553368705*^9, 3.85649356066794*^9}, {
   3.8564947646043468`*^9, 3.8564947838607483`*^9}, {3.8564948399797335`*^9, 
   3.856494857354004*^9}, 3.8564950105215354`*^9},
 CellLabel->"In[28]:=",ExpressionUUID->"40adb93f-e5b5-441c-be65-a0a6dcc83027"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{
   InterpretationBox[
    ButtonBox[
     TooltipBox[
      GraphicsBox[{
        {GrayLevel[0], RectangleBox[{0, 0}]}, 
        {GrayLevel[0], RectangleBox[{1, -1}]}, 
        {RGBColor[0., 0.26666666666666666`, 0.5333333333333333], 
         RectangleBox[{0, -1}, {2, 1}]}},
       AspectRatio->1,
       DefaultBaseStyle->"ColorSwatchGraphics",
       Frame->True,
       FrameStyle->RGBColor[0., 0.17777777777777778`, 0.35555555555555557`],
       FrameTicks->None,
       ImageSize->
        Dynamic[{
         Automatic, 1.35 CurrentValue["FontCapHeight"]/AbsoluteCurrentValue[
          Magnification]}],
       PlotRangePadding->None],
      StyleBox[
       RowBox[{"RGBColor", "[", 
         RowBox[{
          "0.`", ",", "0.26666666666666666`", ",", "0.5333333333333333`"}], 
         "]"}], NumberMarks -> False]],
     Appearance->None,
     BaseStyle->{},
     BaselinePosition->Baseline,
     ButtonFunction:>With[{Typeset`box$ = EvaluationBox[]}, 
       If[
        Not[
         AbsoluteCurrentValue["Deployed"]], 
        SelectionMove[Typeset`box$, All, Expression]; 
        FrontEnd`Private`$ColorSelectorInitialAlpha = 1; 
        FrontEnd`Private`$ColorSelectorInitialColor = 
         RGBColor[0., 0.26666666666666666`, 0.5333333333333333]; 
        FrontEnd`Private`$ColorSelectorUseMakeBoxes = True; 
        MathLink`CallFrontEnd[
          FrontEnd`AttachCell[Typeset`box$, 
           FrontEndResource["RGBColorValueSelector"], {0, {Left, Bottom}}, {
           Left, Top}, 
           "ClosingActions" -> {
            "SelectionDeparture", "ParentChanged", "EvaluatorQuit"}]]]],
     DefaultBaseStyle->{},
     Evaluator->Automatic,
     Method->"Preemptive"],
    RGBColor[0., 0.26666666666666666`, 0.5333333333333333],
    Editable->False,
    Selectable->False], ",", 
   InterpretationBox[
    ButtonBox[
     TooltipBox[
      GraphicsBox[{
        {GrayLevel[0], RectangleBox[{0, 0}]}, 
        {GrayLevel[0], RectangleBox[{1, -1}]}, 
        {RGBColor[0.7333333333333333, 0.3333333333333333, 0.4], 
         RectangleBox[{0, -1}, {2, 1}]}},
       AspectRatio->1,
       DefaultBaseStyle->"ColorSwatchGraphics",
       Frame->True,
       FrameStyle->RGBColor[
        0.4888888888888889, 0.2222222222222222, 0.2666666666666667],
       FrameTicks->None,
       ImageSize->
        Dynamic[{
         Automatic, 1.35 CurrentValue["FontCapHeight"]/AbsoluteCurrentValue[
          Magnification]}],
       PlotRangePadding->None],
      StyleBox[
       RowBox[{"RGBColor", "[", 
         RowBox[{
          "0.7333333333333333`", ",", "0.3333333333333333`", ",", "0.4`"}], 
         "]"}], NumberMarks -> False]],
     Appearance->None,
     BaseStyle->{},
     BaselinePosition->Baseline,
     ButtonFunction:>With[{Typeset`box$ = EvaluationBox[]}, 
       If[
        Not[
         AbsoluteCurrentValue["Deployed"]], 
        SelectionMove[Typeset`box$, All, Expression]; 
        FrontEnd`Private`$ColorSelectorInitialAlpha = 1; 
        FrontEnd`Private`$ColorSelectorInitialColor = 
         RGBColor[0.7333333333333333, 0.3333333333333333, 0.4]; 
        FrontEnd`Private`$ColorSelectorUseMakeBoxes = True; 
        MathLink`CallFrontEnd[
          FrontEnd`AttachCell[Typeset`box$, 
           FrontEndResource["RGBColorValueSelector"], {0, {Left, Bottom}}, {
           Left, Top}, 
           "ClosingActions" -> {
            "SelectionDeparture", "ParentChanged", "EvaluatorQuit"}]]]],
     DefaultBaseStyle->{},
     Evaluator->Automatic,
     Method->"Preemptive"],
    RGBColor[0.7333333333333333, 0.3333333333333333, 0.4],
    Editable->False,
    Selectable->False], ",", 
   InterpretationBox[
    ButtonBox[
     TooltipBox[
      GraphicsBox[{
        {GrayLevel[0], RectangleBox[{0, 0}]}, 
        {GrayLevel[0], RectangleBox[{1, -1}]}, 
        {RGBColor[0.8666666666666667, 0.6666666666666666, 0.2], 
         RectangleBox[{0, -1}, {2, 1}]}},
       AspectRatio->1,
       DefaultBaseStyle->"ColorSwatchGraphics",
       Frame->True,
       FrameStyle->RGBColor[
        0.5777777777777778, 0.4444444444444444, 0.13333333333333336`],
       FrameTicks->None,
       ImageSize->
        Dynamic[{
         Automatic, 1.35 CurrentValue["FontCapHeight"]/AbsoluteCurrentValue[
          Magnification]}],
       PlotRangePadding->None],
      StyleBox[
       RowBox[{"RGBColor", "[", 
         RowBox[{
          "0.8666666666666667`", ",", "0.6666666666666666`", ",", "0.2`"}], 
         "]"}], NumberMarks -> False]],
     Appearance->None,
     BaseStyle->{},
     BaselinePosition->Baseline,
     ButtonFunction:>With[{Typeset`box$ = EvaluationBox[]}, 
       If[
        Not[
         AbsoluteCurrentValue["Deployed"]], 
        SelectionMove[Typeset`box$, All, Expression]; 
        FrontEnd`Private`$ColorSelectorInitialAlpha = 1; 
        FrontEnd`Private`$ColorSelectorInitialColor = 
         RGBColor[0.8666666666666667, 0.6666666666666666, 0.2]; 
        FrontEnd`Private`$ColorSelectorUseMakeBoxes = True; 
        MathLink`CallFrontEnd[
          FrontEnd`AttachCell[Typeset`box$, 
           FrontEndResource["RGBColorValueSelector"], {0, {Left, Bottom}}, {
           Left, Top}, 
           "ClosingActions" -> {
            "SelectionDeparture", "ParentChanged", "EvaluatorQuit"}]]]],
     DefaultBaseStyle->{},
     Evaluator->Automatic,
     Method->"Preemptive"],
    RGBColor[0.8666666666666667, 0.6666666666666666, 0.2],
    Editable->False,
    Selectable->False], ",", 
   InterpretationBox[
    ButtonBox[
     TooltipBox[
      GraphicsBox[{
        {GrayLevel[0], RectangleBox[{0, 0}]}, 
        {GrayLevel[0], RectangleBox[{1, -1}]}, 
        {RGBColor[0.9019607843137255, 0.3764705882352941, 0.], 
         RectangleBox[{0, -1}, {2, 1}]}},
       AspectRatio->1,
       DefaultBaseStyle->"ColorSwatchGraphics",
       Frame->True,
       FrameStyle->RGBColor[0.6013071895424837, 0.25098039215686274`, 0.],
       FrameTicks->None,
       ImageSize->
        Dynamic[{
         Automatic, 1.35 CurrentValue["FontCapHeight"]/AbsoluteCurrentValue[
          Magnification]}],
       PlotRangePadding->None],
      StyleBox[
       RowBox[{"RGBColor", "[", 
         RowBox[{
          "0.9019607843137255`", ",", "0.3764705882352941`", ",", "0.`"}], 
         "]"}], NumberMarks -> False]],
     Appearance->None,
     BaseStyle->{},
     BaselinePosition->Baseline,
     ButtonFunction:>With[{Typeset`box$ = EvaluationBox[]}, 
       If[
        Not[
         AbsoluteCurrentValue["Deployed"]], 
        SelectionMove[Typeset`box$, All, Expression]; 
        FrontEnd`Private`$ColorSelectorInitialAlpha = 1; 
        FrontEnd`Private`$ColorSelectorInitialColor = 
         RGBColor[0.9019607843137255, 0.3764705882352941, 0.]; 
        FrontEnd`Private`$ColorSelectorUseMakeBoxes = True; 
        MathLink`CallFrontEnd[
          FrontEnd`AttachCell[Typeset`box$, 
           FrontEndResource["RGBColorValueSelector"], {0, {Left, Bottom}}, {
           Left, Top}, 
           "ClosingActions" -> {
            "SelectionDeparture", "ParentChanged", "EvaluatorQuit"}]]]],
     DefaultBaseStyle->{},
     Evaluator->Automatic,
     Method->"Preemptive"],
    RGBColor[0.9019607843137255, 0.3764705882352941, 0.],
    Editable->False,
    Selectable->False], ",", 
   InterpretationBox[
    ButtonBox[
     TooltipBox[
      GraphicsBox[{
        {GrayLevel[0], RectangleBox[{0, 0}]}, 
        {GrayLevel[0], RectangleBox[{1, -1}]}, 
        {RGBColor[
         0.3686274509803922, 0.22745098039215686`, 0.6078431372549019], 
         RectangleBox[{0, -1}, {2, 1}]}},
       AspectRatio->1,
       DefaultBaseStyle->"ColorSwatchGraphics",
       Frame->True,
       FrameStyle->RGBColor[
        0.24575163398692812`, 0.1516339869281046, 0.40522875816993464`],
       FrameTicks->None,
       ImageSize->
        Dynamic[{
         Automatic, 1.35 CurrentValue["FontCapHeight"]/AbsoluteCurrentValue[
          Magnification]}],
       PlotRangePadding->None],
      StyleBox[
       RowBox[{"RGBColor", "[", 
         RowBox[{
          "0.3686274509803922`", ",", "0.22745098039215686`", ",", 
           "0.6078431372549019`"}], "]"}], NumberMarks -> False]],
     Appearance->None,
     BaseStyle->{},
     BaselinePosition->Baseline,
     ButtonFunction:>With[{Typeset`box$ = EvaluationBox[]}, 
       If[
        Not[
         AbsoluteCurrentValue["Deployed"]], 
        SelectionMove[Typeset`box$, All, Expression]; 
        FrontEnd`Private`$ColorSelectorInitialAlpha = 1; 
        FrontEnd`Private`$ColorSelectorInitialColor = 
         RGBColor[
          0.3686274509803922, 0.22745098039215686`, 0.6078431372549019]; 
        FrontEnd`Private`$ColorSelectorUseMakeBoxes = True; 
        MathLink`CallFrontEnd[
          FrontEnd`AttachCell[Typeset`box$, 
           FrontEndResource["RGBColorValueSelector"], {0, {Left, Bottom}}, {
           Left, Top}, 
           "ClosingActions" -> {
            "SelectionDeparture", "ParentChanged", "EvaluatorQuit"}]]]],
     DefaultBaseStyle->{},
     Evaluator->Automatic,
     Method->"Preemptive"],
    RGBColor[0.3686274509803922, 0.22745098039215686`, 0.6078431372549019],
    Editable->False,
    Selectable->False], ",", 
   InterpretationBox[
    ButtonBox[
     TooltipBox[
      GraphicsBox[{
        {GrayLevel[0], RectangleBox[{0, 0}]}, 
        {GrayLevel[0], RectangleBox[{1, -1}]}, 
        {RGBColor[
         0.2980392156862745, 0.5803921568627451, 0.34901960784313724`], 
         RectangleBox[{0, -1}, {2, 1}]}},
       AspectRatio->1,
       DefaultBaseStyle->"ColorSwatchGraphics",
       Frame->True,
       FrameStyle->RGBColor[
        0.19869281045751636`, 0.38692810457516347`, 0.2326797385620915],
       FrameTicks->None,
       ImageSize->
        Dynamic[{
         Automatic, 1.35 CurrentValue["FontCapHeight"]/AbsoluteCurrentValue[
          Magnification]}],
       PlotRangePadding->None],
      StyleBox[
       RowBox[{"RGBColor", "[", 
         RowBox[{
          "0.2980392156862745`", ",", "0.5803921568627451`", ",", 
           "0.34901960784313724`"}], "]"}], NumberMarks -> False]],
     Appearance->None,
     BaseStyle->{},
     BaselinePosition->Baseline,
     ButtonFunction:>With[{Typeset`box$ = EvaluationBox[]}, 
       If[
        Not[
         AbsoluteCurrentValue["Deployed"]], 
        SelectionMove[Typeset`box$, All, Expression]; 
        FrontEnd`Private`$ColorSelectorInitialAlpha = 1; 
        FrontEnd`Private`$ColorSelectorInitialColor = 
         RGBColor[
          0.2980392156862745, 0.5803921568627451, 0.34901960784313724`]; 
        FrontEnd`Private`$ColorSelectorUseMakeBoxes = True; 
        MathLink`CallFrontEnd[
          FrontEnd`AttachCell[Typeset`box$, 
           FrontEndResource["RGBColorValueSelector"], {0, {Left, Bottom}}, {
           Left, Top}, 
           "ClosingActions" -> {
            "SelectionDeparture", "ParentChanged", "EvaluatorQuit"}]]]],
     DefaultBaseStyle->{},
     Evaluator->Automatic,
     Method->"Preemptive"],
    RGBColor[0.2980392156862745, 0.5803921568627451, 0.34901960784313724`],
    Editable->False,
    Selectable->False], ",", 
   InterpretationBox[
    ButtonBox[
     TooltipBox[
      GraphicsBox[{
        {GrayLevel[0], RectangleBox[{0, 0}]}, 
        {GrayLevel[0], RectangleBox[{1, -1}]}, 
        {RGBColor[0., 0.588235, 0.705882], RectangleBox[{0, -1}, {2, 1}]}},
       AspectRatio->1,
       DefaultBaseStyle->"ColorSwatchGraphics",
       Frame->True,
       FrameStyle->RGBColor[0., 0.39215666666666665`, 0.470588],
       FrameTicks->None,
       ImageSize->
        Dynamic[{
         Automatic, 1.35 CurrentValue["FontCapHeight"]/AbsoluteCurrentValue[
          Magnification]}],
       PlotRangePadding->None],
      StyleBox[
       RowBox[{"RGBColor", "[", 
         RowBox[{"0.`", ",", "0.588235`", ",", "0.705882`"}], "]"}], 
       NumberMarks -> False]],
     Appearance->None,
     BaseStyle->{},
     BaselinePosition->Baseline,
     ButtonFunction:>With[{Typeset`box$ = EvaluationBox[]}, 
       If[
        Not[
         AbsoluteCurrentValue["Deployed"]], 
        SelectionMove[Typeset`box$, All, Expression]; 
        FrontEnd`Private`$ColorSelectorInitialAlpha = 1; 
        FrontEnd`Private`$ColorSelectorInitialColor = 
         RGBColor[0., 0.588235, 0.705882]; 
        FrontEnd`Private`$ColorSelectorUseMakeBoxes = True; 
        MathLink`CallFrontEnd[
          FrontEnd`AttachCell[Typeset`box$, 
           FrontEndResource["RGBColorValueSelector"], {0, {Left, Bottom}}, {
           Left, Top}, 
           "ClosingActions" -> {
            "SelectionDeparture", "ParentChanged", "EvaluatorQuit"}]]]],
     DefaultBaseStyle->{},
     Evaluator->Automatic,
     Method->"Preemptive"],
    RGBColor[0., 0.588235, 0.705882],
    Editable->False,
    Selectable->False], ",", 
   InterpretationBox[
    ButtonBox[
     TooltipBox[
      GraphicsBox[{
        {GrayLevel[0], RectangleBox[{0, 0}]}, 
        {GrayLevel[0], RectangleBox[{1, -1}]}, 
        {RGBColor[0.790588, 0.201176, 0.], RectangleBox[{0, -1}, {2, 1}]}},
       AspectRatio->1,
       DefaultBaseStyle->"ColorSwatchGraphics",
       Frame->True,
       FrameStyle->RGBColor[0.5270586666666667, 0.13411733333333334`, 0.],
       FrameTicks->None,
       ImageSize->
        Dynamic[{
         Automatic, 1.35 CurrentValue["FontCapHeight"]/AbsoluteCurrentValue[
          Magnification]}],
       PlotRangePadding->None],
      StyleBox[
       RowBox[{"RGBColor", "[", 
         RowBox[{"0.790588`", ",", "0.201176`", ",", "0.`"}], "]"}], 
       NumberMarks -> False]],
     Appearance->None,
     BaseStyle->{},
     BaselinePosition->Baseline,
     ButtonFunction:>With[{Typeset`box$ = EvaluationBox[]}, 
       If[
        Not[
         AbsoluteCurrentValue["Deployed"]], 
        SelectionMove[Typeset`box$, All, Expression]; 
        FrontEnd`Private`$ColorSelectorInitialAlpha = 1; 
        FrontEnd`Private`$ColorSelectorInitialColor = 
         RGBColor[0.790588, 0.201176, 0.]; 
        FrontEnd`Private`$ColorSelectorUseMakeBoxes = True; 
        MathLink`CallFrontEnd[
          FrontEnd`AttachCell[Typeset`box$, 
           FrontEndResource["RGBColorValueSelector"], {0, {Left, Bottom}}, {
           Left, Top}, 
           "ClosingActions" -> {
            "SelectionDeparture", "ParentChanged", "EvaluatorQuit"}]]]],
     DefaultBaseStyle->{},
     Evaluator->Automatic,
     Method->"Preemptive"],
    RGBColor[0.790588, 0.201176, 0.],
    Editable->False,
    Selectable->False]}], "}"}]], "Output",
 CellChangeTimes->{
  3.8272917462352104`*^9, 3.8272919009044085`*^9, 3.8273136681505823`*^9, 
   3.8273138821334105`*^9, 3.827314392010295*^9, 3.8273175092001276`*^9, 
   3.827317685811755*^9, 3.8273177879066*^9, 3.827318512482333*^9, 
   3.8273185524590845`*^9, 3.8273190401773252`*^9, 3.8273924030397563`*^9, 
   3.827393495631353*^9, 3.827394121206979*^9, 3.8273958445965643`*^9, 
   3.8274019513611097`*^9, 3.8274025778601437`*^9, 3.8274035591213093`*^9, 
   3.827476530347096*^9, 3.8274772894969635`*^9, 3.827477677572796*^9, 
   3.8274780904753685`*^9, 3.8281571499047546`*^9, 3.828157830530743*^9, 
   3.828157901874625*^9, 3.8281580182603416`*^9, 3.828158128479737*^9, 
   3.828158314780938*^9, 3.828158516146109*^9, 3.8281599197392497`*^9, 
   3.828160039185204*^9, 3.8281601592291503`*^9, 3.8281612383796453`*^9, 
   3.8281612911474714`*^9, 3.828161377899891*^9, 3.8281614623179417`*^9, 
   3.828161591234454*^9, 3.8281617046170807`*^9, 3.828161911772502*^9, 
   3.828162046419481*^9, 3.828667140535095*^9, 3.8286720331332564`*^9, 
   3.828672417102601*^9, 3.8290170982926955`*^9, 3.8290175949310217`*^9, 
   3.8290185497022123`*^9, 3.829019231312821*^9, 3.829019572758298*^9, 
   3.8290206841109834`*^9, 3.829023760379358*^9, 3.8290376660028534`*^9, 
   3.8290411789076657`*^9, 3.8290420474654036`*^9, 3.829108564533459*^9, 
   3.829133699599501*^9, 3.829134811476364*^9, 3.829183860594551*^9, 
   3.829191080346381*^9, 3.829191517890177*^9, 3.8293660492085943`*^9, 
   3.829644788439809*^9, 3.829647303967986*^9, 3.829656329981992*^9, 
   3.8297095084554424`*^9, 3.8297328353345413`*^9, 3.829739865023349*^9, 
   3.829790725660259*^9, 3.8297911158310847`*^9, 3.829792563314058*^9, 
   3.8297939403566823`*^9, 3.8297947836254425`*^9, 3.829795072569147*^9, 
   3.8297953205681868`*^9, 3.8297962779106026`*^9, 3.8298797953804617`*^9, 
   3.829890737269372*^9, 3.8298918544059668`*^9, 3.8299784759309044`*^9, 
   3.8299789074112177`*^9, 3.829981920350827*^9, 3.830254559768899*^9, 
   3.8303201015691013`*^9, 3.830328510553376*^9, 3.830335963094606*^9, 
   3.8303414126904383`*^9, 3.830404627128339*^9, 3.830416861107788*^9, 
   3.8304207258019695`*^9, 3.8304257319458623`*^9, 3.8304269800991635`*^9, 
   3.8304276746243525`*^9, 3.8305002403246317`*^9, 3.8305018211117153`*^9, 
   3.8305031631244636`*^9, 3.8305081608239655`*^9, 3.8305088285693445`*^9, 
   3.830511429008033*^9, 3.830512289789404*^9, 3.830512557482894*^9, 
   3.830512849385936*^9, 3.830513578211238*^9, 3.8305141506934786`*^9, 
   3.8306690518172674`*^9, 3.8306698585533047`*^9, 3.830670471043719*^9, 
   3.830673394283196*^9, 3.830673797597915*^9, 3.830751908127434*^9, 
   3.830752396323138*^9, 3.8307525469226522`*^9, 3.8307528457520075`*^9, 
   3.830753068436001*^9, 3.830753282491821*^9, 3.830841597219426*^9, 
   3.8308615790971904`*^9, 3.8308624770947294`*^9, 3.8309211046322947`*^9, 
   3.830947054362548*^9, 3.8344842973151217`*^9, 3.834487675963852*^9, 
   3.8344918545777845`*^9, 3.8345526747326903`*^9, 3.8345531652242312`*^9, 
   3.83455349939049*^9, 3.834554090314224*^9, 3.8345570767486787`*^9, 
   3.834559171621105*^9, 3.834559408546684*^9, 3.8345599327678576`*^9, 
   3.8345606864902773`*^9, 3.8345711924767637`*^9, 3.83465580173656*^9, 
   3.834741768749364*^9, 3.8347418242544947`*^9, 3.8347420325593815`*^9, 
   3.834742370352654*^9, 3.8348131904168243`*^9, 3.834814138472768*^9, 
   3.8348177214516563`*^9, 3.8350775510836124`*^9, 3.835078670865614*^9, 
   3.835078923868569*^9, 3.8350862434882507`*^9, 3.8352570618042355`*^9, 
   3.8352581254085093`*^9, 3.835259364444439*^9, 3.835260110095785*^9, 
   3.835260900105106*^9, 3.835261775442216*^9, 3.8376676477671995`*^9, 
   3.8376681377884827`*^9, 3.8376683918986797`*^9, 3.837671528210817*^9, 
   3.8376721039375534`*^9, 3.837675770130668*^9, 3.8377460938576126`*^9, 
   3.8387090224167833`*^9, 3.8387090884163027`*^9, 3.8388756666303787`*^9, 
   3.838877652327202*^9, 3.8388778909524007`*^9, 3.8388780959633694`*^9, 
   3.8388783652142076`*^9, 3.8388785582853017`*^9, 3.83887879603621*^9, 
   3.8389611211547184`*^9, 3.8389619557455235`*^9, 3.838962083643086*^9, 
   3.838962137101077*^9, 3.8389622158710203`*^9, 3.8389622637076287`*^9, 
   3.838962318207134*^9, 3.8405169407228236`*^9, 3.8405173073744397`*^9, 
   3.842676181622772*^9, 3.8426811448618593`*^9, 3.843118717672551*^9, 
   3.843118764651865*^9, 3.8431192036586504`*^9, 3.8431194798363523`*^9, 
   3.843126925229867*^9, 3.8431272767621336`*^9, 3.843128012465475*^9, 
   3.8431281802215877`*^9, 3.843128370724518*^9, 3.843128591043998*^9, 
   3.843128838956661*^9, 3.8431290221148086`*^9, 3.8435484125257373`*^9, 
   3.8435535404418554`*^9, 3.84355368565512*^9, 3.8435541664351573`*^9, 
   3.843554356843392*^9, 3.8435555720816545`*^9, 3.843729599997943*^9, 
   3.8437296462659693`*^9, 3.843795350670204*^9, 3.8438159967957215`*^9, 
   3.843816731890092*^9, 3.843817088614278*^9, 3.843884231465461*^9, 
   3.843885767374055*^9, 3.8438858200126047`*^9, 3.843894125665229*^9, 
   3.843908550415848*^9, 3.8451910242191763`*^9, 3.8451918057527246`*^9, 
   3.8451942975171456`*^9, 3.8456179228158007`*^9, 3.8456195176905775`*^9, 
   3.845619828862104*^9, 3.846327254423435*^9, 3.8465587870622263`*^9, 
   3.8465600018396893`*^9, 3.8465613464104548`*^9, 3.846562023782909*^9, 
   3.846562312054137*^9, 3.846562953244382*^9, 3.846563277378335*^9, 
   3.8465635886923776`*^9, 3.8465639583535557`*^9, 3.846732554583889*^9, 
   3.8467328891977324`*^9, 3.846733009827958*^9, 3.8467330595577836`*^9, 
   3.846733167923682*^9, 3.8467332687235413`*^9, 3.8467333223262596`*^9, 
   3.846733829253356*^9, 3.846733875180005*^9, 3.846734025636963*^9, 
   3.846734164711497*^9, 3.8467343449227514`*^9, 3.8467343952831135`*^9, 
   3.84673443685555*^9, 3.8474423678867974`*^9, 3.8474470617528863`*^9, 
   3.847515893382534*^9, 3.8475162293003073`*^9, 3.847516612660725*^9, 
   3.8480627785727253`*^9, 3.851150736852956*^9, 3.851150862800615*^9, 
   3.8511532848808966`*^9, 3.851165647119401*^9, 3.855308085967676*^9, 
   3.8553082383152423`*^9, 3.8563282066515465`*^9, 3.8563290596237154`*^9, 
   3.856436051869753*^9, 3.8564899401887646`*^9, {3.8564905013511295`*^9, 
   3.8564905044428277`*^9}, 3.8564934355386887`*^9, 3.8564935907104435`*^9, 
   3.856494784177847*^9, {3.856494852144305*^9, 3.856494857752061*^9}, 
   3.856495010844096*^9, 3.856502845608721*^9, 3.8566073328839474`*^9, 
   3.857025791753599*^9, 3.8570281276448784`*^9, 3.857044367703323*^9, 
   3.8570451501793013`*^9, 3.8570452682105837`*^9, 3.85704539160281*^9, 
   3.857045674544944*^9, 3.857046001797903*^9, 3.8570461844200993`*^9, 
   3.8594367785850573`*^9, 3.8594414402493024`*^9, 3.8594419017248898`*^9, 
   3.8594531950517883`*^9, 3.861072392865856*^9, 3.861073318479539*^9, 
   3.8610744949693027`*^9, 3.861075280278316*^9, 3.8610756263513656`*^9, 
   3.861077262399701*^9, 3.861077766148116*^9, 3.861077923556018*^9, 
   3.861079711257422*^9, 3.8611623510104733`*^9, 3.861182705045682*^9, 
   3.8611902649098516`*^9, 3.8611919269866676`*^9, 3.8635150129803915`*^9, 
   3.8635151588298464`*^9, 3.863516346846904*^9, 3.863516513725216*^9, 
   3.86360466169746*^9, 3.863604733882449*^9, 3.8636048021550074`*^9, 
   3.863605399564183*^9, 3.863611820812294*^9, {3.8636119613633423`*^9, 
   3.8636119894625416`*^9}, 3.8641234713137484`*^9, {3.864123577473819*^9, 
   3.8641236010747423`*^9}, 3.864440920691435*^9},
 CellLabel->"Out[36]=",ExpressionUUID->"ae399469-c84c-4826-97fb-efbd5c3728f0"]
}, Open  ]]
}, Open  ]],

Cell[CellGroupData[{

Cell["Plots", "Subsection",
 CellChangeTimes->{{3.863605087112812*^9, 
  3.8636050897074213`*^9}},ExpressionUUID->"b1564ced-ee8e-4db6-970c-\
871039c00e43"],

Cell["Bar chart showing pattern distribution", "Text",
 CellChangeTimes->{{3.8636050930956435`*^9, 3.863605101287778*^9}, 
   3.864440435526224*^9},ExpressionUUID->"f856a575-2147-4c87-878b-\
2c3841573ae3"],

Cell[BoxData[
 RowBox[{
  RowBox[{"bar", " ", "=", 
   RowBox[{"BarChart", "[", 
    RowBox[{
     RowBox[{"Reverse", "[", 
      RowBox[{"Flatten", "[", "patterndist", "]"}], "]"}], ",", 
     RowBox[{"BarOrigin", "\[Rule]", "Left"}], ",", 
     RowBox[{"ChartStyle", "\[Rule]", 
      RowBox[{"Table", "[", 
       RowBox[{
        RowBox[{"Directive", "[", 
         RowBox[{"s", ",", 
          RowBox[{"EdgeForm", "[", "Thick", "]"}]}], "]"}], ",", 
        RowBox[{"{", 
         RowBox[{"s", ",", 
          RowBox[{"{", 
           RowBox[{"fyellow", ",", "fred", ",", "fblue"}], "}"}]}], "}"}]}], 
       "]"}]}], ",", 
     RowBox[{"ChartLabels", "->", 
      RowBox[{"Placed", "[", 
       RowBox[{
        RowBox[{"Table", "[", 
         RowBox[{
          RowBox[{"Style", "[", 
           RowBox[{
            RowBox[{"Row", "[", 
             RowBox[{"{", 
              RowBox[{
               RowBox[{"Round", "[", 
                RowBox[{
                 RowBox[{"patterndist", "[", 
                  RowBox[{"[", "i", "]"}], "]"}], ",", "2"}], "]"}], ",", 
               "\"\<% \>\"", ",", 
               RowBox[{
                RowBox[{"{", 
                 RowBox[{
                 "\"\<Oscillator\>\"", ",", "\"\<Alternator\>\"", ",", 
                  "\"\<Aperiodic\>\""}], "}"}], "[", 
                RowBox[{"[", "i", "]"}], "]"}]}], "}"}], "]"}], ",", "16", 
            ",", 
            RowBox[{"FontFamily", "\[Rule]", "\"\<Carlito\>\""}]}], "]"}], 
          ",", 
          RowBox[{"{", 
           RowBox[{"i", ",", 
            RowBox[{"{", 
             RowBox[{"3", ",", "2", ",", "1"}], "}"}]}], "}"}]}], "]"}], ",", 
        "After"}], "]"}]}], ",", 
     RowBox[{"AspectRatio", "\[Rule]", "1"}], ",", 
     RowBox[{"Frame", "\[Rule]", "False"}], ",", 
     RowBox[{"AxesStyle", "\[Rule]", 
      RowBox[{"Directive", "[", 
       RowBox[{"Black", ",", "Thick"}], "]"}]}], ",", 
     RowBox[{"PlotRange", "\[Rule]", 
      RowBox[{"{", 
       RowBox[{
        RowBox[{"{", 
         RowBox[{"0", ",", "100"}], "}"}], ",", 
        RowBox[{"{", 
         RowBox[{"0.5", ",", "3.5"}], "}"}]}], "}"}]}], ",", 
     RowBox[{"ImageSize", "\[Rule]", "290"}], ",", 
     RowBox[{"ImagePadding", "\[Rule]", " ", 
      RowBox[{"{", 
       RowBox[{
        RowBox[{"{", 
         RowBox[{"10", ",", "200"}], "}"}], ",", 
        RowBox[{"{", 
         RowBox[{"10", ",", "20"}], "}"}]}], "}"}]}], ",", 
     RowBox[{"PlotLabel", "\[Rule]", 
      RowBox[{"Style", "[", 
       RowBox[{"titlename", ",", "Black"}], "]"}]}]}], "]"}]}], 
  ";"}]], "Input",
 CellChangeTimes->{{3.863606143428047*^9, 3.86360615199144*^9}, {
  3.863606213549325*^9, 3.8636062575097437`*^9}, {3.8636063410920515`*^9, 
  3.863606435187771*^9}, {3.8644404356722574`*^9, 3.8644404356746273`*^9}},
 CellLabel->"In[37]:=",ExpressionUUID->"751aa009-ff28-414c-8329-a1b7921bf991"]
}, Open  ]],

Cell[CellGroupData[{

Cell["GTCF", "Subsection",
 CellChangeTimes->{{3.8570263941697245`*^9, 3.8570263995893335`*^9}, {
  3.8636052172110815`*^9, 
  3.863605218106886*^9}},ExpressionUUID->"f6189ecb-8723-4736-8807-\
75cae817f898"],

Cell["Choose number of samples to plot", "Text",
 CellChangeTimes->{{3.8636052217206235`*^9, 
  3.86360522625476*^9}},ExpressionUUID->"d592be4b-3eaa-4a9a-93d0-\
5dd83dd0a904"],

Cell[BoxData[
 RowBox[{
  RowBox[{"randchoice", " ", "=", " ", "10"}], ";"}]], "Input",
 CellLabel->"In[38]:=",ExpressionUUID->"d7d4d181-a87f-475a-82bc-09b5a59f3955"],

Cell[BoxData[
 RowBox[{
  RowBox[{"randfit", "[", "rXout_", "]"}], ":=", " ", 
  RowBox[{"Module", "[", 
   RowBox[{
    RowBox[{"{", 
     RowBox[{"medpos", ",", "medp", ",", "medfit"}], "}"}], ",", 
    "\[IndentingNewLine]", 
    RowBox[{
     RowBox[{"medpos", "=", " ", 
      RowBox[{"Round", "[", 
       RowBox[{
        RowBox[{"SeedRandom", "[", "4214", "]"}], ";", 
        RowBox[{"RandomReal", "[", 
         RowBox[{
          RowBox[{"Length", "[", "rXout", "]"}], ",", "randchoice"}], "]"}]}],
        "]"}]}], ";", "\[IndentingNewLine]", 
     RowBox[{"medp", "=", " ", 
      RowBox[{"Table", "[", 
       RowBox[{
        RowBox[{"Flatten", "[", 
         RowBox[{"rXout", "[", 
          RowBox[{"[", 
           RowBox[{
            RowBox[{"medpos", "[", 
             RowBox[{"[", "i", "]"}], "]"}], ",", 
            RowBox[{"1", ";;", "11"}]}], "]"}], "]"}], "]"}], ",", 
        RowBox[{"{", 
         RowBox[{"i", ",", "1", ",", "randchoice"}], "}"}]}], "]"}]}], ";", 
     "\[IndentingNewLine]", 
     RowBox[{"medfit", " ", "=", " ", 
      RowBox[{"Transpose", "[", 
       RowBox[{"Table", "[", 
        RowBox[{
         RowBox[{
          RowBox[{"paras", "[", 
           RowBox[{"[", "s", "]"}], "]"}], "\[Rule]", 
          RowBox[{
           RowBox[{"medp", "[", 
            RowBox[{"[", "i", "]"}], "]"}], "[", 
           RowBox[{"[", "s", "]"}], "]"}]}], ",", 
         RowBox[{"{", 
          RowBox[{"s", ",", "1", ",", 
           RowBox[{"Length", "[", "paras", "]"}]}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"i", ",", "1", ",", "randchoice"}], "}"}]}], "]"}], "]"}]}],
      ";", "\[IndentingNewLine]", "medfit"}]}], "\[IndentingNewLine]", 
   "]"}]}]], "Input",
 CellChangeTimes->{{3.8570264040075893`*^9, 3.8570264051708426`*^9}, {
   3.8570265623935013`*^9, 3.857026568367089*^9}, {3.8570266169109373`*^9, 
   3.85702667851439*^9}, {3.857026711442211*^9, 3.8570267172485085`*^9}, {
   3.85702693253999*^9, 3.8570269619594655`*^9}, {3.857026998921464*^9, 
   3.857027053751171*^9}, {3.8570270947864265`*^9, 3.857027173487593*^9}, {
   3.857027259734934*^9, 3.857027307973977*^9}, {3.8570277004135704`*^9, 
   3.857027713863308*^9}, 3.863515886905754*^9},
 CellLabel->"In[39]:=",ExpressionUUID->"fa2abaf0-9d5a-47ef-b508-ad60e8d27341"],

Cell[BoxData[
 RowBox[{
  RowBox[{"rt", "[", "rXout_", "]"}], ":=", " ", 
  RowBox[{"Module", "[", 
   RowBox[{
    RowBox[{"{", 
     RowBox[{"medpos", ",", "rt"}], "}"}], ",", "\[IndentingNewLine]", 
    RowBox[{
     RowBox[{"medpos", "=", " ", 
      RowBox[{"Round", "[", 
       RowBox[{
        RowBox[{"SeedRandom", "[", "4214", "]"}], ";", 
        RowBox[{"RandomReal", "[", 
         RowBox[{
          RowBox[{"Length", "[", "rXout", "]"}], ",", "randchoice"}], "]"}]}],
        "]"}]}], ";", "\[IndentingNewLine]", 
     RowBox[{"rt", " ", "=", " ", 
      RowBox[{"Table", "[", 
       RowBox[{
        RowBox[{"If", "[", 
         RowBox[{
          RowBox[{
           RowBox[{"rXout", "[", 
            RowBox[{"[", 
             RowBox[{
              RowBox[{"medpos", "[", 
               RowBox[{"[", "i", "]"}], "]"}], ",", "20"}], "]"}], "]"}], 
           "\[Equal]", "1"}], ",", "\"\<fblue\>\"", ",", 
          RowBox[{"If", "[", 
           RowBox[{
            RowBox[{
             RowBox[{"rXout", "[", 
              RowBox[{"[", 
               RowBox[{
                RowBox[{"medpos", "[", 
                 RowBox[{"[", "i", "]"}], "]"}], ",", "21"}], "]"}], "]"}], 
             "\[Equal]", "1"}], ",", "\"\<fred\>\"", ",", " ", 
            RowBox[{"If", "[", 
             RowBox[{
              RowBox[{
               RowBox[{"rXout", "[", 
                RowBox[{"[", 
                 RowBox[{
                  RowBox[{"medpos", "[", 
                   RowBox[{"[", "i", "]"}], "]"}], ",", "22"}], "]"}], "]"}], 
               "\[Equal]", "1"}], ",", "\"\<fyellow\>\""}], "]"}]}], "]"}]}], 
         "]"}], ",", 
        RowBox[{"{", 
         RowBox[{"i", ",", "1", ",", "randchoice"}], "}"}]}], "]"}]}], ";", 
     "\[IndentingNewLine]", 
     RowBox[{"ToExpression", "[", "rt", "]"}]}]}], "\[IndentingNewLine]", 
   "]"}]}]], "Input",
 CellChangeTimes->{{3.8570272536148243`*^9, 3.857027283725876*^9}, {
   3.8570273153982296`*^9, 3.8570273268488193`*^9}, {3.8570275617088356`*^9, 
   3.857027565206135*^9}, {3.8570277072089586`*^9, 3.8570277111991987`*^9}, 
   3.8635158879229946`*^9},
 CellLabel->"In[40]:=",ExpressionUUID->"3213cd80-c9cc-4bf6-ade5-5eb966bc01f6"],

Cell["Split by pattern", "Text",
 CellChangeTimes->{{3.863605230137328*^9, 3.8636052328674994`*^9}, 
   3.8644404357232485`*^9},ExpressionUUID->"33a2cf14-71aa-4272-94ea-\
62336d0cd45b"],

Cell[BoxData[{
 RowBox[{
  RowBox[{
   RowBox[{"r1randout", " ", "=", " ", 
    RowBox[{"randfit", "[", "r1out", "]"}]}], ";"}], "//", 
  "Quiet"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"r1randrt", " ", "=", " ", 
    RowBox[{"rt", "[", "r1out", "]"}]}], ";"}], "//", 
  "Quiet"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"r2randout", " ", "=", " ", 
    RowBox[{"randfit", "[", "r2out", "]"}]}], ";"}], "//", 
  "Quiet"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"r2randrt", " ", "=", " ", 
    RowBox[{"rt", "[", "r2out", "]"}]}], ";"}], "//", 
  "Quiet"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"r3randout", " ", "=", " ", 
    RowBox[{"randfit", "[", "r3out", "]"}]}], ";"}], "//", 
  "Quiet"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"r3randrt", " ", "=", " ", 
    RowBox[{"rt", "[", "r3out", "]"}]}], ";"}], "//", "Quiet"}]}], "Input",
 CellChangeTimes->{{3.857026584466693*^9, 3.8570265869383817`*^9}, {
  3.8570266958768845`*^9, 3.857026722347443*^9}, {3.8570268799805713`*^9, 
  3.8570268818082657`*^9}, {3.857027339761362*^9, 3.8570273492917356`*^9}, {
  3.863515808857439*^9, 3.863515811790457*^9}, {3.863518039759265*^9, 
  3.8635180784266567`*^9}, {3.8636052354616127`*^9, 3.863605246401366*^9}},
 CellLabel->"In[41]:=",ExpressionUUID->"aefc49b4-3f01-4878-8d19-d75c91522ecc"],

Cell["Define autocorrelation function", "Text",
 CellChangeTimes->{{3.8226350542556515`*^9, 
  3.822635057760313*^9}},ExpressionUUID->"9caf53c7-fbb6-429b-a4ab-\
86be88e2afab"],

Cell[BoxData[
 RowBox[{
  RowBox[{
   RowBox[{"\[Omega]", "[", 
    RowBox[{"k_", ",", "l_", ",", "paras_"}], "]"}], " ", ":=", " ", 
   RowBox[{
    RowBox[{
     RowBox[{"MatrixPower", "[", 
      RowBox[{
       RowBox[{"theta", "/.", "paras"}], ",", "k"}], "]"}], ".", 
     RowBox[{"(", 
      RowBox[{"omega0", "/.", "paras"}], ")"}], ".", 
     RowBox[{"MatrixPower", "[", 
      RowBox[{
       RowBox[{"Transpose", "[", 
        RowBox[{"theta", "/.", "paras"}], "]"}], ",", "l"}], "]"}]}], "+", 
    RowBox[{
     RowBox[{"MatrixPower", "[", 
      RowBox[{
       RowBox[{"theta", "/.", "paras"}], ",", 
       RowBox[{"k", "-", "1"}]}], "]"}], ".", 
     RowBox[{"(", 
      RowBox[{"S2", "/.", "paras"}], ")"}], ".", 
     RowBox[{"MatrixPower", "[", 
      RowBox[{
       RowBox[{"Transpose", "[", 
        RowBox[{"theta", "/.", "paras"}], "]"}], ",", 
       RowBox[{"l", "-", "1"}]}], "]"}]}]}]}], ";"}]], "Input",
 CellChangeTimes->{{3.8249868377145357`*^9, 3.8249869202246823`*^9}, {
  3.8285238111532807`*^9, 3.828523856335956*^9}, {3.857026799556135*^9, 
  3.857026833643489*^9}},
 CellLabel->"In[47]:=",ExpressionUUID->"e1b650b5-43fc-4460-81c7-301c30073d7c"],

Cell[BoxData[
 RowBox[{
  RowBox[{
   RowBox[{"A", "[", 
    RowBox[{"k_", ",", "l_", ",", "paras_"}], "]"}], ":=", 
   RowBox[{"Re", "[", 
    RowBox[{
     RowBox[{"Total", "[", 
      RowBox[{"Flatten", "[", 
       RowBox[{"\[Omega]", "[", 
        RowBox[{"k", ",", "l", ",", "paras"}], "]"}], "]"}], "]"}], "/", 
     RowBox[{"Total", "[", 
      RowBox[{"Flatten", "[", 
       RowBox[{"omega0", "/.", "paras"}], "]"}], "]"}]}], "]"}]}], 
  ";"}]], "Input",
 CellChangeTimes->{{3.8249869745676804`*^9, 3.824987007150401*^9}, {
   3.825159048853648*^9, 3.8251590528065205`*^9}, {3.825482357173972*^9, 
   3.825482358366992*^9}, {3.825482540704588*^9, 3.8254825435624065`*^9}, {
   3.828523815197344*^9, 3.82852381864163*^9}, 3.8285238604421015`*^9, {
   3.828667386523944*^9, 3.828667389023552*^9}, {3.8570268367640467`*^9, 
   3.857026850681882*^9}},
 CellLabel->"In[48]:=",ExpressionUUID->"6c51fd90-7b8e-420e-a326-71ff7486c59d"],

Cell["Functions for plotting tree correlation plots", "Text",
 CellChangeTimes->{{3.823170962572938*^9, 3.8231709743562603`*^9}, {
  3.8273016894824896`*^9, 3.827301693387763*^9}, {3.8296503418365993`*^9, 
  3.829650342817585*^9}},ExpressionUUID->"aa6c1ec3-f1f4-44bc-90f4-\
8fb42a8253c8"],

Cell[BoxData[
 RowBox[{
  RowBox[{"randroutelcfcurve", "[", 
   RowBox[{"paras_", ",", "col_", ",", "legend_", ",", "opac_"}], "]"}], ":=", 
  RowBox[{"Module", "[", 
   RowBox[{
    RowBox[{"{", "routelcfcurve", "}"}], ",", "\[IndentingNewLine]", 
    RowBox[{
     RowBox[{"routelcfcurve", " ", "=", " ", 
      RowBox[{"ListLinePlot", "[", 
       RowBox[{
        RowBox[{"Table", "[", 
         RowBox[{
          RowBox[{"{", 
           RowBox[{"n", ",", 
            RowBox[{"A", "[", 
             RowBox[{"n", ",", "0", ",", "paras"}], "]"}]}], "}"}], ",", 
          RowBox[{"{", 
           RowBox[{"n", ",", "0", ",", "5", ",", "0.1"}], "}"}]}], "]"}], ",", 
        RowBox[{"PlotStyle", "\[Rule]", 
         RowBox[{"Directive", "[", 
          RowBox[{
           RowBox[{"Opacity", "[", "opac", "]"}], ",", "col", ",", 
           RowBox[{"Thickness", "[", ".007", "]"}], ",", 
           RowBox[{"CapForm", "[", "\"\<Butt\>\"", "]"}]}], "]"}]}], ",", 
        RowBox[{"PlotRange", "\[Rule]", 
         RowBox[{"{", 
          RowBox[{
           RowBox[{"{", 
            RowBox[{"0", ",", "5"}], "}"}], ",", 
           RowBox[{"{", 
            RowBox[{
             RowBox[{"-", "1"}], ",", "1"}], "}"}]}], "}"}]}], ",", 
        RowBox[{"Frame", "\[Rule]", "True"}], ",", 
        RowBox[{"FrameLabel", "\[Rule]", 
         RowBox[{"{", 
          RowBox[{"\"\<Generation\>\"", ",", "\"\<Correlation\>\""}], "}"}]}],
         ",", 
        RowBox[{"PlotLabel", "\[Rule]", "titlename"}], ",", 
        RowBox[{"GridLines", "\[Rule]", "Automatic"}], ",", 
        RowBox[{"AlignmentPoint", "\[Rule]", 
         RowBox[{"{", 
          RowBox[{"0", ",", "0"}], "}"}]}], ",", 
        RowBox[{"ImageSize", "\[Rule]", "600"}], ",", 
        RowBox[{"AspectRatio", "\[Rule]", 
         RowBox[{"1", "/", "3"}]}], ",", 
        RowBox[{"LabelStyle", "\[Rule]", 
         RowBox[{"Directive", "[", "14", "]"}]}]}], "]"}]}], ";", 
     "\[IndentingNewLine]", "routelcfcurve"}]}], "\[IndentingNewLine]", 
   "]"}]}]], "Input",
 CellChangeTimes->{{3.822733781909523*^9, 3.822733830725335*^9}, 
   3.8227339926595182`*^9, {3.8227344103942566`*^9, 3.8227344147142816`*^9}, {
   3.8227345193078804`*^9, 3.8227345211446705`*^9}, {3.822734609634065*^9, 
   3.822734610525404*^9}, {3.8236067135796523`*^9, 3.823606743653137*^9}, {
   3.823606819862258*^9, 3.82360682009678*^9}, {3.823606866573838*^9, 
   3.823606866819167*^9}, {3.823607116068136*^9, 3.8236071162596865`*^9}, {
   3.8273007041816244`*^9, 3.8273007233070498`*^9}, {3.827300799608701*^9, 
   3.827300832964759*^9}, {3.8273011420431705`*^9, 3.8273011664448204`*^9}, {
   3.827301250161039*^9, 3.827301250379608*^9}, {3.8273012811525316`*^9, 
   3.827301303138525*^9}, {3.8273013750432987`*^9, 3.8273014392893333`*^9}, {
   3.827301615694402*^9, 3.827301635295938*^9}, {3.827301668288072*^9, 
   3.8273017121671777`*^9}, {3.8281612169521613`*^9, 3.828161217143837*^9}, {
   3.828523866645656*^9, 3.8285238684386845`*^9}, {3.8286685245740275`*^9, 
   3.828668530292614*^9}, {3.828669702496284*^9, 3.8286697028104057`*^9}, {
   3.828670481909336*^9, 3.828670483511592*^9}, {3.829024507840843*^9, 
   3.8290245080060015`*^9}, {3.8426768913380747`*^9, 3.842676917304316*^9}, 
   3.842676962978529*^9, {3.8431189879943223`*^9, 3.8431189888587284`*^9}, {
   3.8570268572683477`*^9, 3.857026871714452*^9}, {3.857027762605511*^9, 
   3.857027792025527*^9}, {3.8570285445107136`*^9, 3.857028557502672*^9}, {
   3.857028665812158*^9, 3.857028665942548*^9}, {3.8570345230218987`*^9, 
   3.8570345236193686`*^9}, {3.857034567581594*^9, 3.8570345950893536`*^9}, {
   3.8570346716121116`*^9, 3.8570346729516697`*^9}, {3.863516268840501*^9, 
   3.8635162753555984`*^9}},
 CellLabel->"In[49]:=",ExpressionUUID->"31c315c3-c751-4e8c-9114-83633207f547"],

Cell[BoxData[
 RowBox[{
  RowBox[{"randroutebcfcurve", "[", 
   RowBox[{"paras_", ",", "col_", ",", "legend_", ",", "opac_"}], "]"}], ":=", 
  RowBox[{"Module", "[", 
   RowBox[{
    RowBox[{"{", "routebcfcurve", "}"}], ",", "\[IndentingNewLine]", 
    RowBox[{
     RowBox[{"routebcfcurve", " ", "=", " ", 
      RowBox[{"ListLinePlot", "[", 
       RowBox[{
        RowBox[{"Table", "[", 
         RowBox[{
          RowBox[{"{", 
           RowBox[{
            RowBox[{"n", "+", "5"}], ",", 
            RowBox[{"A", "[", 
             RowBox[{"n", ",", "n", ",", "paras"}], "]"}]}], "}"}], ",", 
          RowBox[{"{", 
           RowBox[{"n", ",", "0", ",", "3", ",", "0.05"}], "}"}]}], "]"}], 
        ",", 
        RowBox[{"PlotStyle", "\[Rule]", 
         RowBox[{"Directive", "[", 
          RowBox[{
           RowBox[{"Opacity", "[", "opac", "]"}], ",", "col", ",", 
           RowBox[{"Thickness", "[", ".007", "]"}], ",", 
           RowBox[{"CapForm", "[", "\"\<Butt\>\"", "]"}]}], "]"}]}], ",", 
        RowBox[{"PlotRange", "\[Rule]", 
         RowBox[{"{", 
          RowBox[{
           RowBox[{"{", 
            RowBox[{"5", ",", "7"}], "}"}], ",", 
           RowBox[{"{", 
            RowBox[{
             RowBox[{"-", "1"}], ",", "1"}], "}"}]}], "}"}]}], ",", 
        RowBox[{"Frame", "\[Rule]", "True"}], ",", 
        RowBox[{"GridLines", "\[Rule]", "Automatic"}], ",", 
        RowBox[{"AlignmentPoint", "\[Rule]", 
         RowBox[{"{", 
          RowBox[{"0", ",", "0"}], "}"}]}], ",", 
        RowBox[{"ImageSize", "\[Rule]", "400"}], ",", 
        RowBox[{"AspectRatio", "\[Rule]", 
         RowBox[{"1", "/", "2"}]}], ",", 
        RowBox[{"LabelStyle", "\[Rule]", 
         RowBox[{"Directive", "[", "14", "]"}]}], ",", 
        RowBox[{"FrameTicks", "\[Rule]", 
         RowBox[{"{", 
          RowBox[{
           RowBox[{"{", 
            RowBox[{"Automatic", ",", "Automatic"}], "}"}], ",", 
           RowBox[{"{", 
            RowBox[{
             RowBox[{"{", 
              RowBox[{
               RowBox[{"{", 
                RowBox[{"1", ",", "\"\<sister\>\""}], "}"}], ",", 
               RowBox[{"{", 
                RowBox[{"2", ",", "\"\<cousin\>\""}], "}"}]}], "}"}], ",", 
             RowBox[{"{", 
              RowBox[{"1", ",", "1"}], "}"}], ",", 
             RowBox[{"{", 
              RowBox[{"2", ",", "2"}], "}"}]}], "}"}]}], "}"}]}]}], "]"}]}], 
     ";", "\[IndentingNewLine]", "routebcfcurve"}]}], "\[IndentingNewLine]", 
   "]"}]}]], "Input",
 CellChangeTimes->{{3.827301700363487*^9, 3.8273017248255634`*^9}, {
   3.827301800478257*^9, 3.827301800975766*^9}, {3.8273018802673697`*^9, 
   3.8273021221629763`*^9}, {3.8281612216917877`*^9, 
   3.8281612219073753`*^9}, {3.828161404111308*^9, 3.828161408080207*^9}, {
   3.8285238737344427`*^9, 3.828523878226695*^9}, {3.8285239259774313`*^9, 
   3.8285239289479675`*^9}, {3.828667053061*^9, 3.8286670538966923`*^9}, {
   3.828667418384729*^9, 3.828667420743075*^9}, {3.828668511585842*^9, 
   3.8286685207768445`*^9}, {3.828668555752231*^9, 3.8286685558759265`*^9}, {
   3.828668632817288*^9, 3.828668639822071*^9}, {3.8286697061769733`*^9, 
   3.8286697062779536`*^9}, {3.8286697650102563`*^9, 
   3.8286697663535657`*^9}, {3.8290245015479603`*^9, 
   3.8290245018674116`*^9}, {3.829792390557412*^9, 3.8297923929156866`*^9}, 
   3.8426769107031345`*^9, 3.8426769669170294`*^9, {3.843118991921077*^9, 
   3.8431189924739895`*^9}, {3.8570268639554276`*^9, 
   3.8570268736990786`*^9}, {3.8570277773682413`*^9, 
   3.8570277895611753`*^9}, {3.8570285428333654`*^9, 
   3.8570285560476127`*^9}, {3.857028667726488*^9, 3.8570286678119774`*^9}, {
   3.8570345241904526`*^9, 3.8570345244050803`*^9}, {3.8570345697271*^9, 
   3.8570345935838823`*^9}, {3.8570346751762276`*^9, 3.857034676371169*^9}, {
   3.8635162596017294`*^9, 3.8635162668234186`*^9}},
 CellLabel->"In[50]:=",ExpressionUUID->"b1ab7987-fd59-4d67-8624-11cc96ad2f41"],

Cell[BoxData[{
 RowBox[{
  RowBox[{
   RowBox[{"r1lcf", " ", "=", " ", 
    RowBox[{"randroutelcfcurve", "[", 
     RowBox[{
      RowBox[{"r1randout", "[", 
       RowBox[{"[", "1", "]"}], "]"}], ",", 
      RowBox[{"r1randrt", "[", 
       RowBox[{"[", "1", "]"}], "]"}], ",", "1", ",", "1"}], "]"}]}], ";"}], "//",
   "Quiet"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"r2lcf", " ", "=", " ", 
    RowBox[{"randroutelcfcurve", "[", 
     RowBox[{
      RowBox[{"r2randout", "[", 
       RowBox[{"[", "1", "]"}], "]"}], ",", 
      RowBox[{"r2randrt", "[", 
       RowBox[{"[", "1", "]"}], "]"}], ",", "1", ",", "1"}], "]"}]}], ";"}], "//",
   "Quiet"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"r3lcf", " ", "=", " ", 
    RowBox[{"randroutelcfcurve", "[", 
     RowBox[{
      RowBox[{"r3randout", "[", 
       RowBox[{"[", "1", "]"}], "]"}], ",", 
      RowBox[{"r3randrt", "[", 
       RowBox[{"[", "1", "]"}], "]"}], ",", "1", ",", "1"}], "]"}]}], ";"}], "//",
   "Quiet"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"r1bcf", " ", "=", " ", 
    RowBox[{"randroutebcfcurve", "[", 
     RowBox[{
      RowBox[{"r1randout", "[", 
       RowBox[{"[", "1", "]"}], "]"}], ",", 
      RowBox[{"r1randrt", "[", 
       RowBox[{"[", "1", "]"}], "]"}], ",", "1", ",", "1"}], "]"}]}], ";"}], "//",
   "Quiet"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"r2bcf", " ", "=", " ", 
    RowBox[{"randroutebcfcurve", "[", 
     RowBox[{
      RowBox[{"r2randout", "[", 
       RowBox[{"[", "1", "]"}], "]"}], ",", 
      RowBox[{"r2randrt", "[", 
       RowBox[{"[", "1", "]"}], "]"}], ",", "1", ",", "1"}], "]"}]}], ";"}], "//",
   "Quiet"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"r3bcf", " ", "=", " ", 
    RowBox[{"randroutebcfcurve", "[", 
     RowBox[{
      RowBox[{"r3randout", "[", 
       RowBox[{"[", "1", "]"}], "]"}], ",", 
      RowBox[{"r3randrt", "[", 
       RowBox[{"[", "1", "]"}], "]"}], ",", "1", ",", "1"}], "]"}]}], ";"}], "//",
   "Quiet"}]}], "Input",
 CellChangeTimes->{{3.863516295638424*^9, 3.863516326386263*^9}, {
  3.863516441610747*^9, 3.8635164421739893`*^9}, {3.8635165322290487`*^9, 
  3.8635165357868557`*^9}, {3.863518019799361*^9, 3.863518023423183*^9}, {
  3.8635181590310297`*^9, 3.863518250085263*^9}, {3.8635183625047064`*^9, 
  3.863518362903097*^9}, {3.863605251441475*^9, 3.8636052535644646`*^9}},
 CellLabel->"In[51]:=",ExpressionUUID->"d269e063-fd34-4f82-8b50-8eff594d4890"],

Cell[BoxData[{
 RowBox[{
  RowBox[{
   RowBox[{"r1randplotlcf", " ", "=", " ", 
    RowBox[{"Show", "[", 
     RowBox[{"Table", "[", 
      RowBox[{
       RowBox[{"randroutelcfcurve", "[", 
        RowBox[{
         RowBox[{"r1randout", "[", 
          RowBox[{"[", "i", "]"}], "]"}], ",", 
         RowBox[{"r1randrt", "[", 
          RowBox[{"[", "i", "]"}], "]"}], ",", "1", ",", "0.25"}], "]"}], ",", 
       RowBox[{"{", 
        RowBox[{"i", ",", "1", ",", "randchoice"}], "}"}]}], "]"}], "]"}]}], 
   ";"}], "//", "Quiet"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"r1randplotbcf", " ", "=", " ", 
    RowBox[{"Show", "[", 
     RowBox[{"Table", "[", 
      RowBox[{
       RowBox[{"randroutebcfcurve", "[", 
        RowBox[{
         RowBox[{"r1randout", "[", 
          RowBox[{"[", "i", "]"}], "]"}], ",", 
         RowBox[{"r1randrt", "[", 
          RowBox[{"[", "i", "]"}], "]"}], ",", "1", ",", "0.25"}], "]"}], ",", 
       RowBox[{"{", 
        RowBox[{"i", ",", "1", ",", "randchoice"}], "}"}]}], "]"}], "]"}]}], 
   ";"}], "//", "Quiet"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"r2randplotlcf", " ", "=", " ", 
    RowBox[{"Show", "[", 
     RowBox[{"Table", "[", 
      RowBox[{
       RowBox[{"randroutelcfcurve", "[", 
        RowBox[{
         RowBox[{"r2randout", "[", 
          RowBox[{"[", "i", "]"}], "]"}], ",", 
         RowBox[{"r2randrt", "[", 
          RowBox[{"[", "i", "]"}], "]"}], ",", "1", ",", "0.25"}], "]"}], ",", 
       RowBox[{"{", 
        RowBox[{"i", ",", "1", ",", "randchoice"}], "}"}]}], "]"}], "]"}]}], 
   ";"}], "//", "Quiet"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"r2randplotbcf", " ", "=", " ", 
    RowBox[{"Show", "[", 
     RowBox[{"Table", "[", 
      RowBox[{
       RowBox[{"randroutebcfcurve", "[", 
        RowBox[{
         RowBox[{"r2randout", "[", 
          RowBox[{"[", "i", "]"}], "]"}], ",", 
         RowBox[{"r2randrt", "[", 
          RowBox[{"[", "i", "]"}], "]"}], ",", "1", ",", "0.25"}], "]"}], ",", 
       RowBox[{"{", 
        RowBox[{"i", ",", "1", ",", "randchoice"}], "}"}]}], "]"}], "]"}]}], 
   ";"}], "//", "Quiet"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"r3randplotlcf", " ", "=", " ", 
    RowBox[{"Show", "[", 
     RowBox[{"Table", "[", 
      RowBox[{
       RowBox[{"randroutelcfcurve", "[", 
        RowBox[{
         RowBox[{"r3randout", "[", 
          RowBox[{"[", "i", "]"}], "]"}], ",", 
         RowBox[{"r3randrt", "[", 
          RowBox[{"[", "i", "]"}], "]"}], ",", "1", ",", "0.25"}], "]"}], ",", 
       RowBox[{"{", 
        RowBox[{"i", ",", "1", ",", "randchoice"}], "}"}]}], "]"}], "]"}]}], 
   ";"}], "//", "Quiet"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"r3randplotbcf", " ", "=", " ", 
    RowBox[{"Show", "[", 
     RowBox[{"Table", "[", 
      RowBox[{
       RowBox[{"randroutebcfcurve", "[", 
        RowBox[{
         RowBox[{"r3randout", "[", 
          RowBox[{"[", "i", "]"}], "]"}], ",", 
         RowBox[{"r3randrt", "[", 
          RowBox[{"[", "i", "]"}], "]"}], ",", "1", ",", "0.25"}], "]"}], ",", 
       RowBox[{"{", 
        RowBox[{"i", ",", "1", ",", "randchoice"}], "}"}]}], "]"}], "]"}]}], 
   ";"}], "//", "Quiet"}]}], "Input",
 CellChangeTimes->{{3.857026891741514*^9, 3.8570269063565135`*^9}, {
   3.857027353511813*^9, 3.8570273780790462`*^9}, {3.8570274204143987`*^9, 
   3.8570274657515707`*^9}, {3.8570275974698305`*^9, 
   3.8570276813283353`*^9}, {3.857027728212406*^9, 3.8570277344843273`*^9}, 
   3.857028500903654*^9, {3.8635162827427254`*^9, 3.863516286264426*^9}, 
   3.8635164370471897`*^9, {3.8635182529099154`*^9, 3.86351831015479*^9}, {
   3.863605256079791*^9, 3.8636052585649457`*^9}},
 CellLabel->"In[57]:=",ExpressionUUID->"63e1c654-be2f-4523-9ac7-c4aa3a247774"],

Cell["Tick labels", "Text",
 CellChangeTimes->{{3.863605264027828*^9, 
  3.8636052650528817`*^9}},ExpressionUUID->"37862f99-fe8e-4ded-8829-\
e47ba6f74006"],

Cell[BoxData[{
 RowBox[{
  RowBox[{"center", "=", 
   RowBox[{
    RowBox[{"Row", "[", 
     RowBox[{
      RowBox[{"{", 
       RowBox[{"#", ",", 
        RowBox[{"Invisible", "[", "#", "]"}]}], "}"}], ",", 
      "\"\<\[NegativeThickSpace]\>\""}], "]"}], "&"}]}], ";"}], "\n", 
 RowBox[{
  RowBox[{"fam", " ", "=", " ", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{"Style", "[", 
      RowBox[{"\"\<mother\>\"", ",", 
       RowBox[{"LineSpacing", "\[Rule]", 
        RowBox[{"{", 
         RowBox[{".5", ",", "2"}], "}"}]}], ",", 
       RowBox[{"FontFamily", "\[Rule]", "\"\<Carlito\>\""}]}], "]"}], ",", 
     RowBox[{"Style", "[", 
      RowBox[{"\"\<grandmother\>\"", ",", 
       RowBox[{"LineSpacing", "\[Rule]", 
        RowBox[{"{", 
         RowBox[{".5", ",", "2"}], "}"}]}], ",", 
       RowBox[{"FontFamily", "\[Rule]", "\"\<Carlito\>\""}]}], "]"}], ",", 
     RowBox[{"Style", "[", 
      RowBox[{"\"\<great\\ngrandmother\>\"", ",", 
       RowBox[{"LineSpacing", "\[Rule]", 
        RowBox[{"{", 
         RowBox[{".5", ",", "2"}], "}"}]}], ",", 
       RowBox[{"FontFamily", "\[Rule]", "\"\<Carlito\>\""}]}], "]"}], ",", 
     RowBox[{"Style", "[", 
      RowBox[{"\"\<great great\\ngrandmother\>\"", ",", 
       RowBox[{"LineSpacing", "\[Rule]", 
        RowBox[{"{", 
         RowBox[{".5", ",", "2"}], "}"}]}], ",", 
       RowBox[{"FontFamily", "\[Rule]", "\"\<Carlito\>\""}]}], "]"}], ",", 
     "\"\<\>\"", ",", 
     RowBox[{"Style", "[", 
      RowBox[{"\"\<sister\>\"", ",", 
       RowBox[{"LineSpacing", "\[Rule]", 
        RowBox[{"{", 
         RowBox[{".5", ",", "2"}], "}"}]}], ",", 
       RowBox[{"FontFamily", "\[Rule]", "\"\<Carlito\>\""}]}], "]"}], ",", 
     RowBox[{"Style", "[", 
      RowBox[{"\"\<cousin\>\"", ",", 
       RowBox[{"LineSpacing", "\[Rule]", 
        RowBox[{"{", 
         RowBox[{".5", ",", "2"}], "}"}]}], ",", 
       RowBox[{"FontFamily", "\[Rule]", "\"\<Carlito\>\""}]}], "]"}]}], 
    "}"}]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"xticks", "=", 
   RowBox[{"Table", "[", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{"n", ",", 
       RowBox[{"center", "@", 
        RowBox[{"Rotate", "[", 
         RowBox[{
          RowBox[{"fam", "[", 
           RowBox[{"[", "n", "]"}], "]"}], ",", 
          RowBox[{"40", " ", "Degree"}], ",", 
          RowBox[{"{", 
           RowBox[{"Right", ",", "Right"}], "}"}]}], "]"}]}]}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{"n", ",", "1", ",", "7"}], "}"}]}], "]"}]}], ";"}]}], "Input",
 CellChangeTimes->{{3.8290260767605376`*^9, 3.8290260942903585`*^9}, {
  3.8290261425331926`*^9, 3.829026210258238*^9}, {3.8290262588318605`*^9, 
  3.8290262783084574`*^9}, {3.8290263231681323`*^9, 3.829026326158264*^9}, {
  3.8290263803114247`*^9, 3.829026402017121*^9}, {3.8290264404579372`*^9, 
  3.829026449010038*^9}, {3.8290264887954597`*^9, 3.8290265276624346`*^9}, {
  3.829026632795849*^9, 3.8290266331500196`*^9}, {3.8290284723801527`*^9, 
  3.8290285347078996`*^9}, {3.829201034500885*^9, 3.8292010431839323`*^9}, {
  3.842511695299034*^9, 3.8425116959233274`*^9}, {3.8425117922257185`*^9, 
  3.8425118243998194`*^9}, {3.8425118577795095`*^9, 3.8425118791845584`*^9}, {
  3.84251314605336*^9, 3.8425131750015197`*^9}, {3.8425132379115224`*^9, 
  3.8425132766433353`*^9}, {3.8425138183997602`*^9, 3.842513825864018*^9}},
 CellLabel->"In[63]:=",ExpressionUUID->"b469f959-bb16-4d7e-8dc7-a4a3883e38c5"],

Cell[BoxData[{
 RowBox[{
  RowBox[{"txt1", " ", "=", " ", 
   RowBox[{"Text", "[", 
    RowBox[{
     RowBox[{"Style", "[", 
      RowBox[{"\"\<Lineage generation\>\"", ",", "16", ",", 
       RowBox[{"FontFamily", "\[Rule]", "\"\<Carlito\>\""}], ",", "Black", 
       ",", 
       RowBox[{"LineSpacing", "\[Rule]", 
        RowBox[{"{", 
         RowBox[{".7", ",", "2"}], "}"}]}]}], "]"}], ",", 
     RowBox[{"{", 
      RowBox[{"2.5", ",", "1.5"}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{"0", ",", "0"}], "}"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"txt2", " ", "=", " ", 
   RowBox[{"Text", "[", 
    RowBox[{
     RowBox[{"Style", "[", 
      RowBox[{"\"\<Cross branch generation\>\"", ",", "16", ",", 
       RowBox[{"FontFamily", "\[Rule]", "\"\<Carlito\>\""}], ",", "Black", 
       ",", 
       RowBox[{"LineSpacing", "\[Rule]", 
        RowBox[{"{", 
         RowBox[{".7", ",", "2"}], "}"}]}]}], "]"}], ",", 
     RowBox[{"{", 
      RowBox[{"6.2", ",", "1.5"}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{"0", ",", "0"}], "}"}]}], "]"}]}], ";"}]}], "Input",
 CellChangeTimes->{{3.8290274483982716`*^9, 3.829027477932213*^9}, {
   3.8290275780700502`*^9, 3.829027591051441*^9}, {3.829027720744169*^9, 
   3.829027720840102*^9}, {3.829027752907107*^9, 3.829027935792762*^9}, {
   3.8290280512497916`*^9, 3.8290280786387224`*^9}, {3.829028110812752*^9, 
   3.829028132550218*^9}, {3.8290286367805877`*^9, 3.829028693302517*^9}, {
   3.829028756110868*^9, 3.829028756503775*^9}, {3.829028816530861*^9, 
   3.8290288887814455`*^9}, {3.8305113894589386`*^9, 3.830511391897002*^9}, 
   3.8426763945798182`*^9, {3.8426765680637217`*^9, 3.842676570606151*^9}, {
   3.8426809161135798`*^9, 3.84268094966212*^9}},
 CellLabel->"In[66]:=",ExpressionUUID->"8a0c21bf-1496-4c3d-8938-e39b03f3c66b"],

Cell[BoxData[
 RowBox[{
  RowBox[{"ttl", " ", "=", " ", 
   RowBox[{"Text", "[", 
    RowBox[{"Style", "[", 
     RowBox[{"titlename", ",", "18", ",", 
      RowBox[{"FontFamily", "\[Rule]", "\"\<Carlito\>\""}], ",", "Black"}], 
     "]"}], "]"}]}], ";"}]], "Input",
 CellChangeTimes->{{3.8426968535830746`*^9, 3.842696910482848*^9}, {
   3.842697101935458*^9, 3.842697135124935*^9}, 3.863516881604383*^9},
 CellLabel->"In[68]:=",ExpressionUUID->"657482a2-8fe8-49a3-9203-9df83cb6602e"],

Cell[BoxData[
 RowBox[{
  RowBox[{"bgframe", " ", "=", "  ", 
   RowBox[{"ListPlot", "[", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{"5", ",", "5"}], "}"}], ",", 
     RowBox[{"PlotRange", "\[Rule]", 
      RowBox[{"{", 
       RowBox[{
        RowBox[{"{", 
         RowBox[{"0", ",", "8"}], "}"}], ",", 
        RowBox[{"{", 
         RowBox[{
          RowBox[{"-", "1"}], ",", "1"}], "}"}]}], "}"}]}], ",", 
     RowBox[{"Frame", "\[Rule]", "True"}], ",", 
     RowBox[{"FrameTicks", "\[Rule]", 
      RowBox[{"{", 
       RowBox[{
        RowBox[{"{", 
         RowBox[{"Automatic", ",", "Automatic"}], "}"}], ",", 
        RowBox[{"{", 
         RowBox[{"xticks", ",", 
          RowBox[{"{", 
           RowBox[{
            RowBox[{"{", 
             RowBox[{"0", ",", "0"}], "}"}], ",", 
            RowBox[{"{", 
             RowBox[{"1", ",", "1"}], "}"}], ",", 
            RowBox[{"{", 
             RowBox[{"2", ",", "2"}], "}"}], ",", 
            RowBox[{"{", 
             RowBox[{"3", ",", "3"}], "}"}], ",", 
            RowBox[{"{", 
             RowBox[{"4", ",", "4"}], "}"}], ",", 
            RowBox[{"{", 
             RowBox[{"5", ",", "0"}], "}"}], ",", 
            RowBox[{"{", 
             RowBox[{"6", ",", "1"}], "}"}], ",", 
            RowBox[{"{", 
             RowBox[{"7", ",", "2"}], "}"}]}], "}"}]}], "}"}]}], "}"}]}], ",", 
     RowBox[{"FrameLabel", "\[Rule]", 
      RowBox[{"{", 
       RowBox[{
        RowBox[{"{", 
         RowBox[{
          RowBox[{"Style", "[", 
           RowBox[{"\"\<Correlation\>\"", ",", 
            RowBox[{"FontFamily", "\[Rule]", "\"\<Carlito\>\""}]}], "]"}], 
          ",", "None"}], "}"}], ",", 
        RowBox[{"{", 
         RowBox[{"None", ",", "\"\<\>\""}], "}"}]}], "}"}]}], ",", 
     RowBox[{"GridLines", "\[Rule]", 
      RowBox[{"{", 
       RowBox[{
        RowBox[{"{", 
         RowBox[{
         "1", ",", "2", ",", "3", ",", "4", ",", "5", ",", "6", ",", "7"}], 
         "}"}], ",", 
        RowBox[{"{", 
         RowBox[{
          RowBox[{"-", "1"}], ",", 
          RowBox[{"-", "0.5"}], ",", "0", ",", "0.5", ",", "1"}], "}"}]}], 
       "}"}]}], ",", 
     RowBox[{"LabelStyle", "\[Rule]", 
      RowBox[{"Directive", "[", "16", "]"}]}], ",", 
     RowBox[{"AspectRatio", "\[Rule]", 
      RowBox[{"1", "/", "3"}]}], ",", 
     RowBox[{"FrameStyle", "\[Rule]", 
      RowBox[{"Directive", "[", 
       RowBox[{"Thick", ",", "Black"}], "]"}]}], ",", 
     RowBox[{"Epilog", "\[Rule]", 
      RowBox[{"{", 
       RowBox[{"txt1", ",", "txt2"}], "}"}]}], ",", 
     RowBox[{"PlotRangeClipping", "\[Rule]", "False"}], ",", 
     RowBox[{"ImageSize", "\[Rule]", "imagesize"}], ",", 
     RowBox[{"ImagePadding", "\[Rule]", "padding"}], ",", 
     RowBox[{"PlotLabel", "\[Rule]", "ttl"}]}], "]"}]}], ";"}]], "Input",
 CellChangeTimes->{{3.8426764453314943`*^9, 3.8426764470567026`*^9}, {
   3.842682370786956*^9, 3.842682371118294*^9}, {3.8426967472722263`*^9, 
   3.8426967598951473`*^9}, {3.8426968773726983`*^9, 3.8426968812167573`*^9}, 
   3.8635168777315187`*^9},
 CellLabel->"In[69]:=",ExpressionUUID->"b1d3eadc-c589-4782-9d37-e1747ef762cb"],

Cell[BoxData[
 RowBox[{
  RowBox[{"divline", " ", "=", " ", 
   RowBox[{"ListLinePlot", "[", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{
       RowBox[{"{", 
        RowBox[{"5", ",", 
         RowBox[{"-", "1"}]}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{"5", ",", "1"}], "}"}]}], "}"}], ",", 
     RowBox[{"PlotStyle", "\[Rule]", 
      RowBox[{"{", 
       RowBox[{
        RowBox[{"Thickness", "[", "0.005", "]"}], ",", "Black"}], "}"}]}]}], 
    "]"}]}], ";"}]], "Input",
 CellLabel->"In[70]:=",ExpressionUUID->"eaabf5e0-1318-4656-8100-a543f133c584"],

Cell[BoxData[{
 RowBox[{
  RowBox[{"corrdata", " ", "=", " ", 
   RowBox[{"corrdata", "/.", 
    RowBox[{"\"\<NaN\>\"", "\[Rule]", 
     RowBox[{"Sequence", "[", "]"}]}]}]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"corrdata", " ", "=", " ", 
   RowBox[{"corrdata", "/.", 
    RowBox[{
     RowBox[{"{", "}"}], "\[Rule]", 
     RowBox[{"Sequence", "[", "]"}]}]}]}], ";"}]}], "Input",
 CellChangeTimes->{{3.863516699299625*^9, 3.8635167503911715`*^9}},
 CellLabel->"In[71]:=",ExpressionUUID->"ba287795-015f-4525-9c8e-46b60284465b"],

Cell[BoxData[
 RowBox[{
  RowBox[{"corrdataplot", " ", "=", " ", 
   RowBox[{"ListPlot", "[", 
    RowBox[{
     RowBox[{"Table", "[", 
      RowBox[{
       RowBox[{"{", 
        RowBox[{
         RowBox[{
          RowBox[{"{", 
           RowBox[{"1", ",", "2", ",", "3", ",", "4", ",", "6", ",", "7"}], 
           "}"}], "[", 
          RowBox[{"[", "s", "]"}], "]"}], ",", 
         RowBox[{"corrdata", "[", 
          RowBox[{"[", "s", "]"}], "]"}]}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{"s", ",", "1", ",", "6"}], "}"}]}], "]"}], ",", 
     RowBox[{"PlotMarkers", "\[Rule]", 
      RowBox[{"{", "\"\<OpenMarkers\>\"", "}"}]}], ",", 
     RowBox[{"PlotStyle", "\[Rule]", "Black"}]}], "]"}]}], ";"}]], "Input",
 CellLabel->"In[73]:=",ExpressionUUID->"e7f4499f-ce12-4561-a74d-78e7396edb90"],

Cell["Plot GTCF", "Text",
 CellChangeTimes->{{3.863605279332611*^9, 
  3.863605280838589*^9}},ExpressionUUID->"30de5386-d3cb-4a16-8ca1-\
5f6b9a7ad9e7"],

Cell[BoxData[
 RowBox[{
  RowBox[{"gtcfplot", " ", "=", " ", 
   RowBox[{"Show", "[", 
    RowBox[{
    "bgframe", ",", "r1randplotlcf", ",", "r2randplotlcf", ",", 
     "r3randplotlcf", ",", "r1randplotbcf", ",", "r2randplotbcf", ",", 
     "r3randplotbcf", ",", "r1lcf", ",", "r2lcf", ",", "r3lcf", ",", "r1bcf", 
     ",", "r2bcf", ",", "r3bcf", ",", "divline", ",", "corrdataplot"}], 
    "]"}]}], ";"}]], "Input",
 CellChangeTimes->{{3.8570459035145893`*^9, 3.8570459425034666`*^9}, {
   3.8570461196709304`*^9, 3.8570461209870644`*^9}, {3.8635164503331876`*^9, 
   3.8635164586396556`*^9}, {3.863518376121745*^9, 3.8635184442171106`*^9}, 
   3.863518599931449*^9, 3.8636120576358604`*^9},
 CellLabel->"In[74]:=",ExpressionUUID->"838e7a40-ed16-4388-800b-5a3bb0ffe063"]
}, Open  ]],

Cell[CellGroupData[{

Cell["Individual correlations", "Subsection",
 CellChangeTimes->{{3.863605288264809*^9, 
  3.8636052912887793`*^9}},ExpressionUUID->"0fbbbbb7-91a7-4a14-95b9-\
4027a8a33c34"],

Cell[BoxData[
 RowBox[{
  RowBox[{"routecorrs", "[", "rXout_", "]"}], ":=", 
  RowBox[{"Module", "[", 
   RowBox[{
    RowBox[{"{", 
     RowBox[{"med", ",", "lq", ",", "uq", ",", "routecorrs"}], "}"}], ",", 
    "\[IndentingNewLine]", 
    RowBox[{
     RowBox[{"med", " ", "=", " ", 
      RowBox[{"Median", "[", 
       RowBox[{"rXout", "[", 
        RowBox[{"[", 
         RowBox[{";;", ",", 
          RowBox[{"12", ";;", "17"}]}], "]"}], "]"}], "]"}]}], ";", 
     "\[IndentingNewLine]", 
     RowBox[{"lq", " ", "=", " ", 
      RowBox[{
       RowBox[{"Quantile", "[", 
        RowBox[{
         RowBox[{"rXout", "[", 
          RowBox[{"[", 
           RowBox[{";;", ",", 
            RowBox[{"12", ";;", "17"}]}], "]"}], "]"}], ",", "0.025"}], "]"}],
        " ", "-", "med"}]}], ";", "\[IndentingNewLine]", 
     RowBox[{"uq", " ", "=", " ", 
      RowBox[{"med", " ", "-", " ", 
       RowBox[{"Quantile", "[", 
        RowBox[{
         RowBox[{"rXout", "[", 
          RowBox[{"[", 
           RowBox[{";;", ",", 
            RowBox[{"12", ";;", "17"}]}], "]"}], "]"}], ",", "0.975"}], 
        "]"}]}]}], ";", "\[IndentingNewLine]", 
     RowBox[{"routecorrs", " ", "=", " ", 
      RowBox[{"Table", "[", 
       RowBox[{
        RowBox[{"Around", "[", 
         RowBox[{
          RowBox[{"med", "[", 
           RowBox[{"[", "i", "]"}], "]"}], ",", 
          RowBox[{"{", 
           RowBox[{
            RowBox[{"lq", "[", 
             RowBox[{"[", "i", "]"}], "]"}], ",", 
            RowBox[{"uq", "[", 
             RowBox[{"[", "i", "]"}], "]"}]}], "}"}]}], "]"}], ",", 
        RowBox[{"{", 
         RowBox[{"i", ",", "1", ",", "6"}], "}"}]}], "]"}]}], ";", 
     "\[IndentingNewLine]", "routecorrs"}]}], "\[IndentingNewLine]", 
   "]"}]}]], "Input",
 CellChangeTimes->{{3.822732065860261*^9, 3.8227323047428703`*^9}, {
  3.82729418238348*^9, 3.8272941897753224`*^9}, {3.827294995530356*^9, 
  3.8272951346207223`*^9}, {3.8274015002266665`*^9, 3.8274015099637327`*^9}, {
  3.8274017460614033`*^9, 3.827401749535*^9}},
 CellLabel->"In[75]:=",ExpressionUUID->"62ba5aa2-92f5-459a-90e4-efc3f7ab0148"],

Cell[BoxData[{
 RowBox[{
  RowBox[{"size", " ", "=", " ", "2.5"}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"absoluteThickness", " ", "=", " ", "0"}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"filledUpTriangle", "=", 
   RowBox[{"Graphics", "[", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{"Triangle", "[", 
       RowBox[{"{", 
        RowBox[{
         RowBox[{"Offset", "[", 
          RowBox[{
           RowBox[{"size", " ", 
            RowBox[{"{", 
             RowBox[{"0", ",", "2"}], "}"}]}], "+", 
           RowBox[{"absoluteThickness", " ", 
            RowBox[{"{", 
             RowBox[{"0", ",", "1"}], "}"}]}]}], "]"}], ",", 
         RowBox[{"Offset", "[", 
          RowBox[{
           RowBox[{"size", " ", 
            RowBox[{"{", 
             RowBox[{
              RowBox[{"Sqrt", "[", "3", "]"}], ",", 
              RowBox[{"-", "1"}]}], "}"}]}], "+", 
           RowBox[{"absoluteThickness", " ", 
            RowBox[{"{", 
             RowBox[{
              RowBox[{"Sqrt", "[", 
               RowBox[{"3", "/", "4"}], "]"}], ",", 
              RowBox[{
               RowBox[{"-", "1"}], "/", "2"}]}], "}"}]}]}], "]"}], ",", 
         RowBox[{"Offset", "[", 
          RowBox[{
           RowBox[{"size", " ", 
            RowBox[{"{", 
             RowBox[{
              RowBox[{"-", 
               RowBox[{"Sqrt", "[", "3", "]"}]}], ",", 
              RowBox[{"-", "1"}]}], "}"}]}], "+", 
           RowBox[{"absoluteThickness", " ", 
            RowBox[{"{", 
             RowBox[{
              RowBox[{"-", 
               RowBox[{"Sqrt", "[", 
                RowBox[{"3", "/", "4"}], "]"}]}], ",", 
              RowBox[{
               RowBox[{"-", "1"}], "/", "2"}]}], "}"}]}]}], "]"}]}], "}"}], 
       "]"}], "}"}], ",", 
     RowBox[{"AlignmentPoint", "\[Rule]", 
      RowBox[{"{", 
       RowBox[{"0", ",", "0"}], "}"}]}]}], "]"}]}], ";"}]}], "Input",
 CellChangeTimes->{{3.8272965522591515`*^9, 3.8272965522639112`*^9}, 
   3.82730038877275*^9, {3.8273004930720215`*^9, 3.827300493859619*^9}, {
   3.8274013795277433`*^9, 3.8274013809081573`*^9}},
 CellLabel->"In[76]:=",ExpressionUUID->"30cd32ed-e628-4d58-95be-991487e53039"],

Cell[BoxData[
 RowBox[{
  RowBox[{"routecorrplot", "[", 
   RowBox[{"rXout_", ",", "shift_", ",", "col_", ",", "legend_"}], "]"}], ":=", 
  RowBox[{"Module", "[", 
   RowBox[{
    RowBox[{"{", 
     RowBox[{
     "routecorrplot", ",", "routecorrplotfit", ",", "routecorrplotpred"}], 
     "}"}], ",", "\[IndentingNewLine]", 
    RowBox[{
     RowBox[{"routecorrplotfit", " ", "=", " ", 
      RowBox[{"ListPlot", "[", 
       RowBox[{
        RowBox[{"Table", "[", 
         RowBox[{
          RowBox[{"{", 
           RowBox[{
            RowBox[{
             RowBox[{
              RowBox[{"{", 
               RowBox[{"1", ",", "2", ",", "6", ",", "7"}], "}"}], "[", 
              RowBox[{"[", "s", "]"}], "]"}], "+", "shift"}], ",", 
            RowBox[{
             RowBox[{"routecorrs", "[", "rXout", "]"}], "[", 
             RowBox[{"[", 
              RowBox[{
               RowBox[{"{", 
                RowBox[{"1", ",", "2", ",", "5", ",", "6"}], "}"}], "[", 
               RowBox[{"[", "s", "]"}], "]"}], "]"}], "]"}]}], "}"}], ",", 
          RowBox[{"{", 
           RowBox[{"s", ",", "1", ",", "4"}], "}"}]}], "]"}], ",", 
        RowBox[{"PlotStyle", "\[Rule]", "col"}], ",", 
        RowBox[{"PlotRange", "\[Rule]", 
         RowBox[{"{", 
          RowBox[{
           RowBox[{"{", 
            RowBox[{"0", ",", "9"}], "}"}], ",", 
           RowBox[{"{", 
            RowBox[{
             RowBox[{"-", "1"}], ",", "1"}], "}"}]}], "}"}]}], ",", 
        RowBox[{"AlignmentPoint", "\[Rule]", 
         RowBox[{"{", 
          RowBox[{"0", ",", "0"}], "}"}]}], ",", 
        RowBox[{"LabelStyle", "\[Rule]", 
         RowBox[{"Directive", "[", "14", "]"}]}]}], "]"}]}], ";", 
     "\[IndentingNewLine]", 
     RowBox[{"routecorrplotpred", " ", "=", " ", 
      RowBox[{"ListPlot", "[", 
       RowBox[{
        RowBox[{"Table", "[", 
         RowBox[{
          RowBox[{"{", 
           RowBox[{
            RowBox[{"s", "+", "shift"}], ",", 
            RowBox[{
             RowBox[{"routecorrs", "[", "rXout", "]"}], "[", 
             RowBox[{"[", "s", "]"}], "]"}]}], "}"}], ",", 
          RowBox[{"{", 
           RowBox[{"s", ",", 
            RowBox[{"{", 
             RowBox[{"3", ",", "4"}], "}"}]}], "}"}]}], "]"}], ",", 
        RowBox[{"PlotRange", "\[Rule]", 
         RowBox[{"{", 
          RowBox[{
           RowBox[{"{", 
            RowBox[{"0", ",", "9"}], "}"}], ",", 
           RowBox[{"{", 
            RowBox[{
             RowBox[{"-", "1"}], ",", "1"}], "}"}]}], "}"}]}], ",", 
        RowBox[{"AlignmentPoint", "\[Rule]", 
         RowBox[{"{", 
          RowBox[{"0", ",", "0"}], "}"}]}], ",", 
        RowBox[{"PlotMarkers", "\[Rule]", 
         RowBox[{"{", "filledUpTriangle", "}"}]}], ",", 
        RowBox[{"LabelStyle", "\[Rule]", 
         RowBox[{"Directive", "[", "14", "]"}]}], ",", 
        RowBox[{"PlotStyle", "\[Rule]", "col"}]}], "]"}]}], ";", 
     "\[IndentingNewLine]", 
     RowBox[{"routecorrplot", " ", "=", " ", 
      RowBox[{"Show", "[", 
       RowBox[{"routecorrplotfit", ",", "routecorrplotpred"}], "]"}]}]}]}], 
   "\[IndentingNewLine]", "]"}]}]], "Input",
 CellChangeTimes->{{3.822732366280317*^9, 3.822732521950235*^9}, {
   3.822733408847431*^9, 3.8227334397314615`*^9}, {3.8227335276558332`*^9, 
   3.8227335302733946`*^9}, {3.8227336370798635`*^9, 3.822733649402671*^9}, {
   3.822733712446328*^9, 3.8227337171944046`*^9}, 3.822733856060111*^9, {
   3.827295277327523*^9, 3.827295277424545*^9}, {3.82729588123114*^9, 
   3.8272958872156553`*^9}, {3.8272959567584085`*^9, 3.827295990485484*^9}, {
   3.8272960205131664`*^9, 3.827296163260498*^9}, {3.827296229724204*^9, 
   3.8272962456762433`*^9}, {3.8272964038133287`*^9, 3.827296484637086*^9}, {
   3.827296559115813*^9, 3.8272966299076166`*^9}, {3.827296701118779*^9, 
   3.827296749052178*^9}, {3.8272971232575445`*^9, 3.827297150459549*^9}, {
   3.827297282019389*^9, 3.8272972993108683`*^9}, {3.8272973480764923`*^9, 
   3.8272973482529573`*^9}, {3.8272973921730366`*^9, 3.827297480408081*^9}, {
   3.8272975544015217`*^9, 3.827297626841749*^9}, {3.8272976631396093`*^9, 
   3.8272977299872084`*^9}, {3.8272977723155317`*^9, 3.827297854534054*^9}, {
   3.8273000856152124`*^9, 3.827300145513568*^9}, {3.827300440738306*^9, 
   3.82730044881595*^9}, {3.827401402690064*^9, 3.8274014057630444`*^9}, {
   3.8281580618459935`*^9, 3.8281580672991185`*^9}, {3.828668125170123*^9, 
   3.828668165837716*^9}, {3.828668201156171*^9, 3.8286682130685673`*^9}, {
   3.8286704008983984`*^9, 3.8286704174130545`*^9}},
 CellLabel->"In[79]:=",ExpressionUUID->"af2d52ea-e11b-4a4a-934a-6fc7082833ce"],

Cell[BoxData[
 RowBox[{
  RowBox[{"routecorrplotlegend", "[", 
   RowBox[{"rXout_", ",", "shift_", ",", "col_", ",", "legend_"}], "]"}], ":=", 
  RowBox[{"Module", "[", 
   RowBox[{
    RowBox[{"{", 
     RowBox[{
     "routecorrplotlegend", ",", "routecorrplotfit", ",", 
      "routecorrplotpred"}], "}"}], ",", "\[IndentingNewLine]", 
    RowBox[{
     RowBox[{"routecorrplotfit", " ", "=", " ", 
      RowBox[{"ListPlot", "[", 
       RowBox[{
        RowBox[{"Table", "[", 
         RowBox[{
          RowBox[{"{", 
           RowBox[{
            RowBox[{
             RowBox[{
              RowBox[{"{", 
               RowBox[{"1", ",", "2", ",", "6", ",", "7"}], "}"}], "[", 
              RowBox[{"[", "s", "]"}], "]"}], "+", "shift"}], ",", 
            RowBox[{
             RowBox[{"routecorrs", "[", "rXout", "]"}], "[", 
             RowBox[{"[", 
              RowBox[{
               RowBox[{"{", 
                RowBox[{"1", ",", "2", ",", "5", ",", "6"}], "}"}], "[", 
               RowBox[{"[", "s", "]"}], "]"}], "]"}], "]"}]}], "}"}], ",", 
          RowBox[{"{", 
           RowBox[{"s", ",", "1", ",", "4"}], "}"}]}], "]"}], ",", 
        RowBox[{"PlotStyle", "\[Rule]", "col"}], ",", 
        RowBox[{"PlotRange", "\[Rule]", 
         RowBox[{"{", 
          RowBox[{
           RowBox[{"{", 
            RowBox[{"0", ",", "9"}], "}"}], ",", 
           RowBox[{"{", 
            RowBox[{
             RowBox[{"-", "1"}], ",", "1"}], "}"}]}], "}"}]}], ",", 
        RowBox[{"AlignmentPoint", "\[Rule]", 
         RowBox[{"{", 
          RowBox[{"0", ",", "0"}], "}"}]}], ",", 
        RowBox[{"PlotLegends", "\[Rule]", 
         RowBox[{"Placed", "[", 
          RowBox[{
           RowBox[{"{", 
            RowBox[{"Style", "[", 
             RowBox[{"legend", ",", 
              RowBox[{"FontFamily", "\[Rule]", "\"\<Carlito\>\""}]}], "]"}], 
            "}"}], ",", "Below"}], "]"}]}], ",", 
        RowBox[{"LabelStyle", "\[Rule]", 
         RowBox[{"Directive", "[", "14", "]"}]}]}], "]"}]}], ";", 
     "\[IndentingNewLine]", 
     RowBox[{"routecorrplotpred", " ", "=", " ", 
      RowBox[{"ListPlot", "[", 
       RowBox[{
        RowBox[{"Table", "[", 
         RowBox[{
          RowBox[{"{", 
           RowBox[{
            RowBox[{"s", "+", "shift"}], ",", 
            RowBox[{
             RowBox[{"routecorrs", "[", "rXout", "]"}], "[", 
             RowBox[{"[", "s", "]"}], "]"}]}], "}"}], ",", 
          RowBox[{"{", 
           RowBox[{"s", ",", 
            RowBox[{"{", 
             RowBox[{"3", ",", "4"}], "}"}]}], "}"}]}], "]"}], ",", 
        RowBox[{"PlotRange", "\[Rule]", 
         RowBox[{"{", 
          RowBox[{
           RowBox[{"{", 
            RowBox[{"0", ",", "9"}], "}"}], ",", 
           RowBox[{"{", 
            RowBox[{
             RowBox[{"-", "1"}], ",", "1"}], "}"}]}], "}"}]}], ",", 
        RowBox[{"AlignmentPoint", "\[Rule]", 
         RowBox[{"{", 
          RowBox[{"0", ",", "0"}], "}"}]}], ",", 
        RowBox[{"PlotMarkers", "\[Rule]", 
         RowBox[{"{", "filledUpTriangle", "}"}]}], ",", 
        RowBox[{"LabelStyle", "\[Rule]", 
         RowBox[{"Directive", "[", "14", "]"}]}], ",", 
        RowBox[{"PlotStyle", "\[Rule]", "col"}]}], "]"}]}], ";", 
     "\[IndentingNewLine]", 
     RowBox[{"routecorrplotlegend", " ", "=", " ", 
      RowBox[{"Show", "[", 
       RowBox[{"routecorrplotfit", ",", "routecorrplotpred"}], "]"}]}]}]}], 
   "\[IndentingNewLine]", "]"}]}]], "Input",
 CellChangeTimes->{{3.8290221955979605`*^9, 3.829022222022817*^9}, {
  3.829022343150876*^9, 3.8290224051765757`*^9}, {3.8290225809105363`*^9, 
  3.8290225844940825`*^9}, {3.829022629531187*^9, 3.8290228085003757`*^9}, {
  3.829023078936906*^9, 3.8290230796758795`*^9}, {3.829023112008486*^9, 
  3.82902311912925*^9}},
 CellLabel->"In[80]:=",ExpressionUUID->"ee920d9e-d810-43ee-a84a-2a234c817b6b"],

Cell[BoxData[{
 RowBox[{
  RowBox[{"corrlegend", " ", "=", " ", 
   RowBox[{"ListPlot", "[", 
    RowBox[{
     RowBox[{"Table", "[", 
      RowBox[{
       RowBox[{"{", 
        RowBox[{
         RowBox[{
          RowBox[{"{", 
           RowBox[{"1", ",", "2", ",", "3", ",", "4", ",", "6", ",", "7"}], 
           "}"}], "[", 
          RowBox[{"[", "s", "]"}], "]"}], ",", 
         RowBox[{"corrdata", "[", 
          RowBox[{"[", "s", "]"}], "]"}]}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{"s", ",", "1", ",", "6"}], "}"}]}], "]"}], ",", 
     RowBox[{"PlotMarkers", "\[Rule]", "\"\<OpenMarkers\>\""}], ",", 
     RowBox[{"PlotStyle", "\[Rule]", "Black"}], ",", 
     RowBox[{"LabelStyle", "\[Rule]", 
      RowBox[{"Directive", "[", "14", "]"}]}], ",", 
     RowBox[{"PlotLegends", "\[Rule]", 
      RowBox[{"Placed", "[", 
       RowBox[{
        RowBox[{"{", 
         RowBox[{"Style", "[", 
          RowBox[{"\"\<Data\>\"", ",", 
           RowBox[{"FontFamily", "\[Rule]", "\"\<Carlito\>\""}]}], "]"}], 
         "}"}], ",", "Below"}], "]"}]}]}], "]"}]}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"dl", " ", "=", " ", 
    RowBox[{"routecorrplotlegend", "[", 
     RowBox[{
     "outputfile", ",", "0.15", ",", "Black", ",", "\"\<Model fit\>\""}], 
     "]"}]}], ";"}], "//", "Quiet"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"r1l", " ", "=", " ", 
    RowBox[{"routecorrplotlegend", "[", 
     RowBox[{"r1out", ",", "0.15", ",", "fblue", ",", "\"\<Route 1\>\""}], 
     "]"}]}], ";"}], "//", "Quiet"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"r2l", " ", "=", " ", 
    RowBox[{"routecorrplotlegend", "[", 
     RowBox[{"r2out", ",", "0.15", ",", "fred", ",", "\"\<Route 2\>\""}], 
     "]"}]}], ";"}], "//", "Quiet"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"r3l", " ", "=", " ", 
    RowBox[{"routecorrplotlegend", "[", 
     RowBox[{"r3out", ",", "0.15", ",", "fyellow", ",", "\"\<Route 3\>\""}], 
     "]"}]}], ";"}], "//", "Quiet"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"fig3leg", " ", "=", " ", 
    RowBox[{"Show", "[", 
     RowBox[{"corrlegend", ",", "dl", ",", "r1l", ",", "r2l", ",", "r3l"}], 
     "]"}]}], ";"}], "//", "Quiet"}]}], "Input",
 CellChangeTimes->{{3.8290222245159464`*^9, 3.8290222371291*^9}, {
   3.829022809735958*^9, 3.8290230065498676`*^9}, {3.82902305850181*^9, 
   3.829023066605598*^9}, {3.829023125677472*^9, 3.8290231325573473`*^9}, {
   3.8290231645726833`*^9, 3.829023167046134*^9}, 3.863518713815708*^9, {
   3.8636052944058585`*^9, 3.8636052996386395`*^9}},
 CellLabel->"In[81]:=",ExpressionUUID->"7ef8f20c-2e3c-459b-9673-9a7b02769826"],

Cell[BoxData[{
 RowBox[{
  RowBox[{"infplot", " ", "=", " ", 
   RowBox[{"routecorrplot", "[", 
    RowBox[{"outputfile", ",", 
     RowBox[{"-", "0.15"}], ",", "Black", ",", "\"\<Model Fit\>\""}], "]"}]}],
   ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"r1plot", " ", "=", " ", 
    RowBox[{"routecorrplot", "[", 
     RowBox[{"r1out", ",", "0.15", ",", "fblue", ",", "\"\<Route 1\>\""}], 
     "]"}]}], ";"}], "//", "Quiet"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"r2plot", " ", "=", " ", 
    RowBox[{"routecorrplot", "[", 
     RowBox[{"r2out", ",", "0.25", ",", "fred", ",", "\"\<Route 2\>\""}], 
     "]"}]}], ";"}], "//", "Quiet"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"r3plot", " ", "=", " ", 
    RowBox[{"routecorrplot", "[", 
     RowBox[{"r3out", ",", "0.35", ",", "fyellow", ",", "\"\<Route 3\>\""}], 
     "]"}]}], ";"}], "//", "Quiet"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"corrplot", " ", "=", " ", 
   RowBox[{"Show", "[", 
    RowBox[{
    "bgframe", ",", "corrdataplot", ",", "divline", ",", "infplot", ",", 
     "r1plot", ",", "r2plot", ",", "r3plot"}], "]"}]}], ";"}]}], "Input",
 CellChangeTimes->{3.8636053056229844`*^9},
 CellLabel->"In[87]:=",ExpressionUUID->"e24ccf3c-6cef-4752-b8c1-047f478987c0"]
}, Open  ]],

Cell[CellGroupData[{

Cell["Various underlying oscillator histograms", "Subsection",
 CellChangeTimes->{{3.822634704697558*^9, 3.822634707815794*^9}, {
  3.8226381043136497`*^9, 3.8226381071915474`*^9}, {3.8273117561065617`*^9, 
  3.8273117878085413`*^9}, {3.863605313298947*^9, 
  3.8636053212255793`*^9}},ExpressionUUID->"7ec1fefc-23bc-49b6-9d47-\
f38487d82d91"],

Cell["Find location of positive periods", "Text",
 CellChangeTimes->{{3.827311723101102*^9, 
  3.827311728542798*^9}},ExpressionUUID->"02545ddd-b068-4093-ba7e-\
dcd11ce7679b"],

Cell[BoxData[
 RowBox[{
  RowBox[{"posper", " ", "=", " ", 
   RowBox[{"Select", "[", 
    RowBox[{
     RowBox[{"Flatten", "[", 
      RowBox[{"Position", "[", 
       RowBox[{
        RowBox[{"Positive", "[", 
         RowBox[{"Mean", "[", 
          RowBox[{"r1out", "[", 
           RowBox[{"[", 
            RowBox[{";;", ",", ";;"}], "]"}], "]"}], "]"}], "]"}], ",", 
        "True"}], "]"}], "]"}], ",", 
     RowBox[{
      RowBox[{"23", "\[LessEqual]", "#", "\[LessEqual]", "32"}], "&"}]}], 
    "]"}]}], ";"}]], "Input",
 CellChangeTimes->{{3.827311663356591*^9, 3.8273117085188217`*^9}, {
  3.8274017783515244`*^9, 3.8274017803158016`*^9}, {3.863518851447487*^9, 
  3.8635188527632227`*^9}},
 CellLabel->"In[92]:=",ExpressionUUID->"4cfd18a0-a6c2-4f5d-ad9d-f0cabc1b4c5c"],

Cell["Text with calculated median and 95% CI overlaid", "Text",
 CellChangeTimes->{{3.8273117345243845`*^9, 
  3.827311737163683*^9}},ExpressionUUID->"6aa73df0-20c8-4d44-b9d5-\
ddbc62722f0e"],

Cell[BoxData[
 RowBox[{
  RowBox[{"perds", " ", "=", " ", 
   RowBox[{"Table", "[", 
    RowBox[{
     RowBox[{"r1out", "[", 
      RowBox[{"[", 
       RowBox[{";;", ",", 
        RowBox[{"posper", "[", 
         RowBox[{"[", "i", "]"}], "]"}]}], "]"}], "]"}], ",", 
     RowBox[{"{", 
      RowBox[{"i", ",", "1", ",", "5"}], "}"}]}], "]"}]}], ";"}]], "Input",
 CellChangeTimes->{{3.822721480287239*^9, 3.8227215271596336`*^9}, {
   3.822980987627135*^9, 3.8229809877620225`*^9}, {3.823584653922229*^9, 
   3.8235846540701685`*^9}, 3.827311744208888*^9},
 CellLabel->"In[93]:=",ExpressionUUID->"7b2c0f95-e967-47c5-b6ef-16f96b7dda4a"],

Cell[BoxData[
 RowBox[{
  RowBox[{"pervals", " ", "=", " ", 
   RowBox[{"Median", "[", 
    RowBox[{"Transpose", "[", "perds", "]"}], "]"}]}], ";"}]], "Input",
 CellLabel->"In[94]:=",ExpressionUUID->"3b56eaf2-897d-4785-b59a-ce95ad3912c1"],

Cell[BoxData[
 RowBox[{
  RowBox[{"loghist1", " ", "=", " ", 
   RowBox[{"SmoothHistogram", "[", 
    RowBox[{"perds", ",", "Automatic", ",", "\"\<PDF\>\"", ",", 
     RowBox[{"Filling", "\[Rule]", "Bottom"}], ",", 
     RowBox[{"ImageSize", "\[Rule]", "600"}], ",", 
     RowBox[{"Frame", "\[Rule]", "True"}], ",", " ", 
     RowBox[{"FrameLabel", "\[Rule]", 
      RowBox[{"{", 
       RowBox[{"\"\<Period (hours)\>\"", ",", "\"\<Probability\>\""}], 
       "}"}]}], ",", 
     RowBox[{"LabelStyle", "\[Rule]", 
      RowBox[{"Directive", "[", "16", "]"}]}], ",", 
     RowBox[{"PlotStyle", "\[Rule]", 
      RowBox[{"Directive", "[", 
       RowBox[{"EdgeForm", "[", "None", "]"}], "]"}]}], ",", 
     RowBox[{"GridLines", "\[Rule]", "Automatic"}], ",", 
     RowBox[{"PlotLabel", "\[Rule]", 
      RowBox[{"Style", "[", 
       RowBox[{"titlename", ",", "Black", ",", 
        RowBox[{"FontFamily", "\[Rule]", "\"\<Carlito\>\""}]}], "]"}]}], ",", 
     RowBox[{"FrameStyle", "\[Rule]", 
      RowBox[{"Directive", "[", 
       RowBox[{"Black", ",", "Thick"}], "]"}]}], ",", 
     RowBox[{"AspectRatio", "\[Rule]", 
      RowBox[{"1", "/", "3"}]}], ",", 
     RowBox[{"ScalingFunctions", "\[Rule]", 
      RowBox[{"{", 
       RowBox[{"\"\<Log\>\"", ",", "\"\<Log\>\""}], "}"}]}], ",", 
     RowBox[{"PlotRange", "\[Rule]", 
      RowBox[{"{", 
       RowBox[{
        RowBox[{"{", 
         RowBox[{"0", ",", 
          RowBox[{
           RowBox[{"Max", "[", "pervals", "]"}], "+", "30"}]}], "}"}], ",", 
        RowBox[{"{", 
         RowBox[{"0.01", ",", "Automatic"}], "}"}]}], "}"}]}]}], "]"}]}], 
  ";"}]], "Input",
 CellChangeTimes->CompressedData["
1:eJxTTMoPSmViYGAQAWIQXWabkfZ+2RvHmC+hGSD6wZ/4HBC9wDe2EER78VWW
geg575RrQLSalE8jiC762wemmx4ltoFot0TOCSC6ZbHhdBCdO4V7Hog2qlZe
DKJ/vBBbBqK/mHszfgDSBjmJrCCay8tVDUQ/bXLVA9EveOuts468cYx6+hBM
39D4ag+iz4n9ANMLuh19QTTb11UBILrTrL8QRE/SbCoG0WfuHqkA0U6yWl0g
+tTmoDkgOpOpBUybKbJezwbS+/pyb4BogT/5F4VPvnF8fLgTTL89P4dBBEhf
2n6MEURbPuHhAdFrHjoLgeiq1CUK1qfeONpMfA2mAfJhr+I=
  "],
 CellLabel->"In[95]:=",ExpressionUUID->"b589e195-0339-44df-8a7c-255d019110f6"],

Cell[BoxData[
 RowBox[{
  RowBox[{"pertable", " ", "=", " ", 
   RowBox[{"Table", "[", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{
       RowBox[{"{", 
        RowBox[{
         RowBox[{"Log", "[", 
          RowBox[{"pervals", "[", 
           RowBox[{"[", "i", "]"}], "]"}], "]"}], ",", 
         RowBox[{"-", "100"}]}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
         RowBox[{"Log", "[", 
          RowBox[{"pervals", "[", 
           RowBox[{"[", "i", "]"}], "]"}], "]"}], ",", "20"}], "}"}]}], "}"}],
      ",", 
     RowBox[{"{", 
      RowBox[{"i", ",", "1", ",", "5"}], "}"}]}], "]"}]}], ";"}]], "Input",
 CellChangeTimes->{{3.861077352067731*^9, 3.861077397959532*^9}, {
  3.8610775823929543`*^9, 3.8610775836689653`*^9}, {3.8610776303395677`*^9, 
  3.8610776528210397`*^9}, {3.864123641218484*^9, 3.864123648401511*^9}},
 CellLabel->"In[96]:=",ExpressionUUID->"656468b2-3200-4e85-96ce-32ed78935e1e"],

Cell[BoxData[
 RowBox[{
  RowBox[{"pertableplot", " ", "=", " ", 
   RowBox[{"ListLinePlot", "[", 
    RowBox[{"pertable", ",", 
     RowBox[{"PlotStyle", "\[Rule]", "Dashed"}]}], "]"}]}], ";"}]], "Input",
 CellChangeTimes->{{3.861077589443328*^9, 3.8610776055176716`*^9}, {
  3.861077845980648*^9, 3.8610778486792364`*^9}},
 CellLabel->"In[97]:=",ExpressionUUID->"2a624955-60e9-4ff6-9258-d65d9dfdde5e"],

Cell[BoxData[
 RowBox[{
  RowBox[{"loghist", " ", "=", " ", 
   RowBox[{"Show", "[", 
    RowBox[{"loghist1", ",", "pertableplot"}], "]"}]}], ";"}]], "Input",
 CellChangeTimes->{{3.864123659189165*^9, 3.864123669881945*^9}},
 CellLabel->"In[98]:=",ExpressionUUID->"51997c5a-765b-471e-934b-756cb4ef2f18"],

Cell[BoxData[
 RowBox[{
  RowBox[{"underperiods", " ", "=", " ", 
   RowBox[{"Reverse", "[", 
    RowBox[{"pervals", "[", 
     RowBox[{"[", 
      RowBox[{"Ordering", "[", "pervals", "]"}], "]"}], "]"}], "]"}]}], 
  ";"}]], "Input",
 CellChangeTimes->{{3.8635192751031494`*^9, 3.863519314197103*^9}, {
   3.863605328219768*^9, 3.8636053337658772`*^9}, 3.863612077372635*^9},
 CellLabel->"In[99]:=",ExpressionUUID->"552cbe8b-1113-4c55-852b-f8bf2fc26c98"]
}, Open  ]]
}, Open  ]],

Cell[CellGroupData[{

Cell["Plots", "Section",
 CellChangeTimes->{{3.8636049012637286`*^9, 
  3.8636049018157196`*^9}},ExpressionUUID->"15785a90-e5d2-4f87-8d63-\
4899fc2f8399"],

Cell[CellGroupData[{

Cell["Behaviour distribution", "Subsection",
 CellChangeTimes->{{3.8636056107250834`*^9, 
  3.863605613261956*^9}},ExpressionUUID->"df590685-26af-4893-b841-\
b1bcee1137de"],

Cell["\<\
Bar chart indicating the distribution of patterns for this dataset\
\>", "Text",
 CellChangeTimes->{{3.863605616851612*^9, 3.8636056258828993`*^9}, 
   3.8644404357995663`*^9},ExpressionUUID->"0331d9ba-e598-404b-abcd-\
2b57b464d305"],

Cell[BoxData["bar"], "Input",
 CellChangeTimes->{{3.8636049225298653`*^9, 3.8636049244125814`*^9}},
 CellLabel->
  "In[100]:=",ExpressionUUID->"8d41c51a-4570-47aa-b0d9-5ccc634034da"]
}, Open  ]],

Cell[CellGroupData[{

Cell["Model fit", "Subsection",
 CellChangeTimes->{{3.8636055335472393`*^9, 
  3.863605555704915*^9}},ExpressionUUID->"95d56186-bb3c-4c87-8d5c-\
681d1069bce7"],

Cell["\<\
Correlations from data plotted alongside model fit and predictions for \
lineage generations 3 and 4\
\>", "Text",
 CellChangeTimes->{{3.863605559850795*^9, 
  3.8636055726079187`*^9}},ExpressionUUID->"c1077833-8d06-49a3-82cc-\
8430565c5a87"],

Cell[BoxData["corrplot"], "Input",
 CellChangeTimes->{{3.8636049149901*^9, 3.8636049185421114`*^9}},
 CellLabel->
  "In[101]:=",ExpressionUUID->"3dae6f57-dd70-41c6-8257-553b433e8e26"]
}, Open  ]],

Cell[CellGroupData[{

Cell["Generalised tree correlation function", "Subsection",
 CellChangeTimes->{{3.863605578453741*^9, 
  3.8636055838284845`*^9}},ExpressionUUID->"be618218-b74d-4b1e-8d72-\
ed7fe8e0b797"],

Cell["Plot of 10 parameter samples producing the GTCF", "Text",
 CellChangeTimes->{{3.863605588827694*^9, 
  3.8636056049350786`*^9}},ExpressionUUID->"472a97e1-b120-4c53-8008-\
1588a6eaf2e1"],

Cell[BoxData["gtcfplot"], "Input",
 CellChangeTimes->{{3.863604919601987*^9, 3.8636049214777455`*^9}},
 CellLabel->
  "In[102]:=",ExpressionUUID->"acf8888a-b7a6-4746-a60e-0cd225502774"]
}, Open  ]],

Cell[CellGroupData[{

Cell["Underlying periods", "Subsection",
 CellChangeTimes->{{3.8636056318075857`*^9, 
  3.8636056353461747`*^9}},ExpressionUUID->"a2a11a47-c4bf-416f-b382-\
595c5b3be611"],

Cell["Possible underlying periods", "Text",
 CellChangeTimes->{{3.8636056385069017`*^9, 
  3.863605641754179*^9}},ExpressionUUID->"c8c28168-2900-4fb5-bc5c-\
060f5bb6e180"],

Cell[BoxData["loghist"], "Input",
 CellChangeTimes->{{3.8641236801572256`*^9, 3.8641236816588793`*^9}},
 CellLabel->
  "In[103]:=",ExpressionUUID->"44bc6d9d-bd93-438e-b04e-5be75bca9a2c"],

Cell["Median of histograms, in large-small order", "Text",
 CellChangeTimes->{{3.863605649592119*^9, 
  3.8636056611579547`*^9}},ExpressionUUID->"3c5857c3-e5da-4115-b548-\
20243e7a71de"],

Cell[BoxData["underperiods"], "Input",
 CellChangeTimes->{{3.8636053377942677`*^9, 3.863605339727703*^9}},
 CellLabel->
  "In[104]:=",ExpressionUUID->"8b0bedd4-81d0-4607-a87d-94ba38730de8"]
}, Open  ]]
}, Open  ]]
}, Open  ]]
},
WindowSize->{950, 988},
WindowMargins->{{Automatic, -642}, {713, Automatic}},
TaggingRules->{"TryRealOnly" -> False},
FrontEndVersion->"12.0 for Microsoft Windows (64-bit) (April 8, 2019)",
StyleDefinitions->Notebook[{
   Cell[
    StyleData[StyleDefinitions -> "Default.nb"]], 
   Cell[
    StyleData["Graphics", All], FontFamily -> "Carlito"]}, Visible -> False, 
  FrontEndVersion -> "12.0 for Microsoft Windows (64-bit) (April 8, 2019)", 
  StyleDefinitions -> "PrivateStylesheetFormatting.nb"]
]
(* End of Notebook Content *)

(* Internal cache information *)
(*CellTagsOutline
CellTagsIndex->{}
*)
(*CellTagsIndex
CellTagsIndex->{}
*)
(*NotebookFileOutline
Notebook[{
Cell[CellGroupData[{
Cell[580, 22, 189, 3, 67, "Chapter",ExpressionUUID->"de06434e-4e49-4105-ad70-e674389f6d6b"],
Cell[772, 27, 286, 6, 34, "Text",ExpressionUUID->"8b336b89-fdbc-4751-96b0-ed715eb3901c"],
Cell[CellGroupData[{
Cell[1083, 37, 212, 4, 67, "Section",ExpressionUUID->"ec4e3fd9-f150-4b56-83e9-796278e6a4b3"],
Cell[CellGroupData[{
Cell[1320, 45, 178, 3, 44, "Subsubsection",ExpressionUUID->"64941a6c-75ce-4bfa-935a-c9e405e9c6fb"],
Cell[1501, 50, 157, 3, 34, "Text",ExpressionUUID->"a184baad-9ddd-41ea-b343-a2ab2f0406d9"],
Cell[1661, 55, 1352, 32, 105, "Input",ExpressionUUID->"2e7218bd-fba5-434b-a792-189f3cb9df02"],
Cell[3016, 89, 179, 3, 34, "Text",ExpressionUUID->"2cf69406-9e10-4309-b10f-3d172858d418"],
Cell[3198, 94, 945, 19, 67, "Input",ExpressionUUID->"37d629f3-245f-4e67-99b0-beea3d958720"],
Cell[4146, 115, 158, 3, 34, "Text",ExpressionUUID->"e558c4ef-6017-4e68-a358-0dffa4233389"],
Cell[4307, 120, 989, 24, 105, "Input",ExpressionUUID->"0242d7d0-01b8-4d18-ac88-7a9f4e6a3a55"],
Cell[5299, 146, 160, 3, 34, "Text",ExpressionUUID->"59dfffac-9708-4def-a908-f089bf0e6491"],
Cell[5462, 151, 997, 18, 28, "Input",ExpressionUUID->"0c4c688d-ab2b-4ec9-8d6b-710648e7b031"],
Cell[6462, 171, 174, 3, 34, "Text",ExpressionUUID->"4ad1c131-e91f-457c-bf57-5318ff175b1c"],
Cell[6639, 176, 975, 20, 28, "Input",ExpressionUUID->"3ba888ac-0b69-418e-9957-0a4f9e57b641"],
Cell[7617, 198, 224, 4, 34, "Text",ExpressionUUID->"bd26b7d1-a283-4d16-b881-768f2fa55654"],
Cell[7844, 204, 1880, 49, 86, "Input",ExpressionUUID->"c77e8e03-ae86-4f5b-9108-4f9726544be2"],
Cell[9727, 255, 277, 6, 34, "Text",ExpressionUUID->"48fc439d-6c45-4f0a-9900-12dd5fe2d1e5"],
Cell[10007, 263, 983, 19, 28, "Input",ExpressionUUID->"8881108b-4d69-4a9a-a7ae-03fb84a13cc1"],
Cell[10993, 284, 757, 22, 28, "Input",ExpressionUUID->"dbcdab71-a391-47f0-a2dd-9a48f4a01185"],
Cell[11753, 308, 438, 10, 28, "Input",ExpressionUUID->"60a7f7ee-b4a0-4428-b2bb-2745524c54c5"],
Cell[12194, 320, 473, 12, 48, "Input",ExpressionUUID->"7d2c7586-df09-49e9-ae34-61061f649db2"],
Cell[12670, 334, 178, 3, 34, "Text",ExpressionUUID->"1b701453-210b-41e7-a5ed-1b2098ee26a6"],
Cell[12851, 339, 1039, 28, 48, "Input",ExpressionUUID->"5a748923-e94b-4c58-b77a-f291bd9800de"],
Cell[13893, 369, 171, 3, 34, "Text",ExpressionUUID->"821eda9f-823d-4c12-bfdc-d963bd3b5cbe"],
Cell[14067, 374, 318, 7, 28, "Input",ExpressionUUID->"01190e2d-dc27-403c-b801-d95af7a32af6"],
Cell[14388, 383, 174, 3, 34, "Text",ExpressionUUID->"6a334f50-69f9-4b72-ac59-3be15e4b00ad"],
Cell[14565, 388, 334, 6, 28, "Input",ExpressionUUID->"ffdf8b67-a63a-4486-9e29-c2a299836361"],
Cell[CellGroupData[{
Cell[14924, 398, 415, 10, 28, "Input",ExpressionUUID->"c4c15abf-c22d-44c0-a9fa-28faf246fdc0"],
Cell[15342, 410, 3619, 54, 32, "Output",ExpressionUUID->"c5087a29-d02e-44f7-8dab-4250d7e7be99"]
}, Open  ]],
Cell[18976, 467, 157, 3, 34, "Text",ExpressionUUID->"873c8c7b-d3ca-4a1f-93aa-a250ade54939"],
Cell[19136, 472, 568, 16, 28, "Input",ExpressionUUID->"e46fa090-9fb6-4819-b406-907200da5aa6"],
Cell[CellGroupData[{
Cell[19729, 492, 1916, 45, 181, "Input",ExpressionUUID->"40adb93f-e5b5-441c-be65-a0a6dcc83027"],
Cell[21648, 539, 21973, 485, 32, "Output",ExpressionUUID->"ae399469-c84c-4826-97fb-efbd5c3728f0"]
}, Open  ]]
}, Open  ]],
Cell[CellGroupData[{
Cell[43670, 1030, 155, 3, 53, "Subsection",ExpressionUUID->"b1564ced-ee8e-4db6-970c-871039c00e43"],
Cell[43828, 1035, 205, 3, 34, "Text",ExpressionUUID->"f856a575-2147-4c87-878b-2c3841573ae3"],
Cell[44036, 1040, 2890, 75, 143, "Input",ExpressionUUID->"751aa009-ff28-414c-8329-a1b7921bf991"]
}, Open  ]],
Cell[CellGroupData[{
Cell[46963, 1120, 207, 4, 53, "Subsection",ExpressionUUID->"f6189ecb-8723-4736-8807-75cae817f898"],
Cell[47173, 1126, 175, 3, 34, "Text",ExpressionUUID->"d592be4b-3eaa-4a9a-93d0-5dd83dd0a904"],
Cell[47351, 1131, 166, 3, 28, "Input",ExpressionUUID->"d7d4d181-a87f-475a-82bc-09b5a59f3955"],
Cell[47520, 1136, 2298, 55, 124, "Input",ExpressionUUID->"fa2abaf0-9d5a-47ef-b508-ad60e8d27341"],
Cell[49821, 1193, 2215, 56, 143, "Input",ExpressionUUID->"3213cd80-c9cc-4bf6-ade5-5eb966bc01f6"],
Cell[52039, 1251, 185, 3, 34, "Text",ExpressionUUID->"33a2cf14-71aa-4272-94ea-62336d0cd45b"],
Cell[52227, 1256, 1375, 35, 124, "Input",ExpressionUUID->"aefc49b4-3f01-4878-8d19-d75c91522ecc"],
Cell[53605, 1293, 175, 3, 34, "Text",ExpressionUUID->"9caf53c7-fbb6-429b-a4ab-86be88e2afab"],
Cell[53783, 1298, 1181, 31, 48, "Input",ExpressionUUID->"e1b650b5-43fc-4460-81c7-301c30073d7c"],
Cell[54967, 1331, 936, 21, 28, "Input",ExpressionUUID->"6c51fd90-7b8e-420e-a326-71ff7486c59d"],
Cell[55906, 1354, 288, 4, 34, "Text",ExpressionUUID->"aa6c1ec3-f1f4-44bc-90f4-8fb42a8253c8"],
Cell[56197, 1360, 3801, 73, 143, "Input",ExpressionUUID->"31c315c3-c751-4e8c-9114-83633207f547"],
Cell[60001, 1435, 3942, 84, 162, "Input",ExpressionUUID->"b1ab7987-fd59-4d67-8624-11cc96ad2f41"],
Cell[63946, 1521, 2492, 66, 124, "Input",ExpressionUUID->"d269e063-fd34-4f82-8b50-8eff594d4890"],
Cell[66441, 1589, 3809, 98, 143, "Input",ExpressionUUID->"63e1c654-be2f-4523-9ac7-c4aa3a247774"],
Cell[70253, 1689, 155, 3, 34, "Text",ExpressionUUID->"37862f99-fe8e-4ded-8829-e47ba6f74006"],
Cell[70411, 1694, 3423, 79, 162, "Input",ExpressionUUID->"b469f959-bb16-4d7e-8dc7-a4a3883e38c5"],
Cell[73837, 1775, 1828, 40, 67, "Input",ExpressionUUID->"8a0c21bf-1496-4c3d-8938-e39b03f3c66b"],
Cell[75668, 1817, 485, 10, 28, "Input",ExpressionUUID->"657482a2-8fe8-49a3-9203-9df83cb6602e"],
Cell[76156, 1829, 3145, 82, 124, "Input",ExpressionUUID->"b1d3eadc-c589-4782-9d37-e1747ef762cb"],
Cell[79304, 1913, 569, 17, 28, "Input",ExpressionUUID->"eaabf5e0-1318-4656-8100-a543f133c584"],
Cell[79876, 1932, 541, 13, 48, "Input",ExpressionUUID->"ba287795-015f-4525-9c8e-46b60284465b"],
Cell[80420, 1947, 809, 21, 48, "Input",ExpressionUUID->"e7f4499f-ce12-4561-a74d-78e7396edb90"],
Cell[81232, 1970, 151, 3, 34, "Text",ExpressionUUID->"30de5386-d3cb-4a16-8ca1-5f6b9a7ad9e7"],
Cell[81386, 1975, 773, 14, 48, "Input",ExpressionUUID->"838e7a40-ed16-4388-800b-5a3bb0ffe063"]
}, Open  ]],
Cell[CellGroupData[{
Cell[82196, 1994, 173, 3, 53, "Subsection",ExpressionUUID->"0fbbbbb7-91a7-4a14-95b9-4027a8a33c34"],
Cell[82372, 1999, 2122, 55, 143, "Input",ExpressionUUID->"62ba5aa2-92f5-459a-90e4-efc3f7ab0148"],
Cell[84497, 2056, 2204, 59, 143, "Input",ExpressionUUID->"30cd32ed-e628-4d58-95be-991487e53039"],
Cell[86704, 2117, 4626, 102, 162, "Input",ExpressionUUID->"af2d52ea-e11b-4a4a-934a-6fc7082833ce"],
Cell[91333, 2221, 3876, 96, 200, "Input",ExpressionUUID->"ee920d9e-d810-43ee-a84a-2a234c817b6b"],
Cell[95212, 2319, 2695, 67, 162, "Input",ExpressionUUID->"7ef8f20c-2e3c-459b-9673-9a7b02769826"],
Cell[97910, 2388, 1291, 32, 105, "Input",ExpressionUUID->"e24ccf3c-6cef-4752-b8c1-047f478987c0"]
}, Open  ]],
Cell[CellGroupData[{
Cell[99238, 2425, 342, 5, 53, "Subsection",ExpressionUUID->"7ec1fefc-23bc-49b6-9d47-f38487d82d91"],
Cell[99583, 2432, 175, 3, 34, "Text",ExpressionUUID->"02545ddd-b068-4093-ba7e-dcd11ce7679b"],
Cell[99761, 2437, 781, 20, 28, "Input",ExpressionUUID->"4cfd18a0-a6c2-4f5d-ad9d-f0cabc1b4c5c"],
Cell[100545, 2459, 191, 3, 34, "Text",ExpressionUUID->"6aa73df0-20c8-4d44-b9d5-ddbc62722f0e"],
Cell[100739, 2464, 635, 15, 28, "Input",ExpressionUUID->"7b2c0f95-e967-47c5-b6ef-16f96b7dda4a"],
Cell[101377, 2481, 238, 5, 28, "Input",ExpressionUUID->"3b56eaf2-897d-4785-b59a-ce95ad3912c1"],
Cell[101618, 2488, 2101, 48, 105, "Input",ExpressionUUID->"b589e195-0339-44df-8a7c-255d019110f6"],
Cell[103722, 2538, 925, 24, 28, "Input",ExpressionUUID->"656468b2-3200-4e85-96ce-32ed78935e1e"],
Cell[104650, 2564, 403, 8, 28, "Input",ExpressionUUID->"2a624955-60e9-4ff6-9258-d65d9dfdde5e"],
Cell[105056, 2574, 303, 6, 28, "Input",ExpressionUUID->"51997c5a-765b-471e-934b-756cb4ef2f18"],
Cell[105362, 2582, 454, 10, 28, "Input",ExpressionUUID->"552cbe8b-1113-4c55-852b-f8bf2fc26c98"]
}, Open  ]]
}, Open  ]],
Cell[CellGroupData[{
Cell[105865, 2598, 154, 3, 67, "Section",ExpressionUUID->"15785a90-e5d2-4f87-8d63-4899fc2f8399"],
Cell[CellGroupData[{
Cell[106044, 2605, 172, 3, 53, "Subsection",ExpressionUUID->"df590685-26af-4893-b841-b1bcee1137de"],
Cell[106219, 2610, 243, 5, 34, "Text",ExpressionUUID->"0331d9ba-e598-404b-abcd-2b57b464d305"],
Cell[106465, 2617, 182, 3, 28, "Input",ExpressionUUID->"8d41c51a-4570-47aa-b0d9-5ccc634034da"]
}, Open  ]],
Cell[CellGroupData[{
Cell[106684, 2625, 159, 3, 53, "Subsection",ExpressionUUID->"95d56186-bb3c-4c87-8d5c-681d1069bce7"],
Cell[106846, 2630, 252, 6, 34, "Text",ExpressionUUID->"c1077833-8d06-49a3-82cc-8430565c5a87"],
Cell[107101, 2638, 183, 3, 28, "Input",ExpressionUUID->"3dae6f57-dd70-41c6-8257-553b433e8e26"]
}, Open  ]],
Cell[CellGroupData[{
Cell[107321, 2646, 187, 3, 53, "Subsection",ExpressionUUID->"be618218-b74d-4b1e-8d72-ed7fe8e0b797"],
Cell[107511, 2651, 191, 3, 34, "Text",ExpressionUUID->"472a97e1-b120-4c53-8008-1588a6eaf2e1"],
Cell[107705, 2656, 185, 3, 28, "Input",ExpressionUUID->"acf8888a-b7a6-4746-a60e-0cd225502774"]
}, Open  ]],
Cell[CellGroupData[{
Cell[107927, 2664, 170, 3, 53, "Subsection",ExpressionUUID->"a2a11a47-c4bf-416f-b382-595c5b3be611"],
Cell[108100, 2669, 171, 3, 34, "Text",ExpressionUUID->"c8c28168-2900-4fb5-bc5c-060f5bb6e180"],
Cell[108274, 2674, 186, 3, 28, "Input",ExpressionUUID->"44bc6d9d-bd93-438e-b04e-5be75bca9a2c"],
Cell[108463, 2679, 186, 3, 34, "Text",ExpressionUUID->"3c5857c3-e5da-4115-b548-20243e7a71de"],
Cell[108652, 2684, 189, 3, 28, "Input",ExpressionUUID->"8b0bedd4-81d0-4607-a87d-94ba38730de8"]
}, Open  ]]
}, Open  ]]
}, Open  ]]
}
]
*)

back to top