Skip to content

Commit a9c4697

Browse files
committed
Improve tutorial_3.ipynb
1 parent 6ed8e31 commit a9c4697

1 file changed

Lines changed: 60 additions & 14 deletions

File tree

docs/source/tutorial_3.ipynb

Lines changed: 60 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"After preprocessing actigraphy data using the methods defined in the `Raw` class, users can begin calculating metrics based on the activity and light time series. These include common circadian rhythm metrics such as Interdaily Stability (IS) and Relative Amplitude (RA), among others.\n",
1717
"\n",
1818
"<div class=\"alert alert-block alert-info\">\n",
19-
"<b>Contrast with pyActigraphy</b><p>A key architectural difference between <code>circStudio</code> and <code>pyActigraphy</code> lies in how metric functions are implemented. In <code>pyActigraphy</code>, metrics are defined as methods of the <code>BaseRaw</code> class, which inherits from the mixin subclasses <code>MetricsMixin</code>, <code>ScoringMixin</code> and <code>SleepBoutMixin</code>, and initializes a new <code>LightRecording</code> instance to store the light intensity data.</p>\n",
19+
"<b>Contrast with pyActigraphy</b><p>A key architectural difference between <code>circStudio</code> and <code>pyActigraphy</code> lies in how metric functions are implemented. In <code>pyActigraphy</code>, metrics are defined as methods of the <code>BaseRaw</code> class, which inherits from the mixin subclasses <code>MetricsMixin</code>, <code>ScoringMixin</code> and <code>SleepBoutMixin</code>, and initializes a <code>LightRecording</code> instance to store the light intensity data.</p>\n",
2020
"\n",
2121
"<p>In contrast, <code>circStudio</code> separates data structure from metric computation. The <code>Raw</code> class contains only the data attributes of the actigraphy recording and methods for transforming them (e.g., masking, binarization, imputation).</p>\n",
2222
"\n",
@@ -77,7 +77,9 @@
7777
{
7878
"cell_type": "markdown",
7979
"id": "81acabce-d6d1-49c0-9c9a-124b2f28629b",
80-
"metadata": {},
80+
"metadata": {
81+
"jp-MarkdownHeadingCollapsed": true
82+
},
8183
"source": [
8284
"### Activity"
8385
]
@@ -256,15 +258,19 @@
256258
{
257259
"cell_type": "markdown",
258260
"id": "0f27eb6f-9927-4012-93fe-6de14e7554b6",
259-
"metadata": {},
261+
"metadata": {
262+
"jp-MarkdownHeadingCollapsed": true
263+
},
260264
"source": [
261265
"### Light"
262266
]
263267
},
264268
{
265269
"cell_type": "markdown",
266270
"id": "dfaa3f1e-8d93-4df7-982d-7760583b19d7",
267-
"metadata": {},
271+
"metadata": {
272+
"jp-MarkdownHeadingCollapsed": true
273+
},
268274
"source": [
269275
"#### Average daily light profile"
270276
]
@@ -274,7 +280,7 @@
274280
"id": "9343441e-9056-44e0-a1ba-25b7340541c8",
275281
"metadata": {},
276282
"source": [
277-
"By default, `daily_profile` a `pd.Series`, but the user can modify the behavior of the function to generate an interactive daily profile plot. So, instead of:"
283+
"By default, `daily_profile` function returns a `pd.Series` containing the average daily light intensity values. However, its behavior can be modified to generate an interactive daily profile plot instead. For example, instead of:"
278284
]
279285
},
280286
{
@@ -314,7 +320,7 @@
314320
"id": "0bbee183-04e1-491e-8588-d4250e05c4b7",
315321
"metadata": {},
316322
"source": [
317-
"Do:"
323+
"Simply do:"
318324
]
319325
},
320326
{
@@ -6491,7 +6497,9 @@
64916497
{
64926498
"cell_type": "markdown",
64936499
"id": "0fbc99b5-d822-4ed6-84b1-f22513eca87c",
6494-
"metadata": {},
6500+
"metadata": {
6501+
"jp-MarkdownHeadingCollapsed": true
6502+
},
64956503
"source": [
64966504
"#### Interdaily stability (IS)"
64976505
]
@@ -6520,7 +6528,9 @@
65206528
{
65216529
"cell_type": "markdown",
65226530
"id": "c1571089-4088-46de-b98e-6bbfedf8950c",
6523-
"metadata": {},
6531+
"metadata": {
6532+
"jp-MarkdownHeadingCollapsed": true
6533+
},
65246534
"source": [
65256535
"#### Interdaily variability (IV)"
65266536
]
@@ -6549,7 +6559,9 @@
65496559
{
65506560
"cell_type": "markdown",
65516561
"id": "e419d854-a2ed-407b-ab9e-82c9c3365bbc",
6552-
"metadata": {},
6562+
"metadata": {
6563+
"jp-MarkdownHeadingCollapsed": true
6564+
},
65536565
"source": [
65546566
"#### Ten brightest hours of the day (M10)"
65556567
]
@@ -6578,9 +6590,11 @@
65786590
{
65796591
"cell_type": "markdown",
65806592
"id": "a101bacf-67be-400d-a0f7-74397dc256d9",
6581-
"metadata": {},
6593+
"metadata": {
6594+
"jp-MarkdownHeadingCollapsed": true
6595+
},
65826596
"source": [
6583-
"#### Five least illuminated hours of the day (M10)"
6597+
"#### Five least illuminated hours of the day (L5)"
65846598
]
65856599
},
65866600
{
@@ -6604,20 +6618,52 @@
66046618
"l5(data=raw.light)"
66056619
]
66066620
},
6621+
{
6622+
"cell_type": "markdown",
6623+
"id": "36061f50-a197-4671-940f-b4c29e2e2618",
6624+
"metadata": {},
6625+
"source": [
6626+
"### Sleep"
6627+
]
6628+
},
6629+
{
6630+
"cell_type": "markdown",
6631+
"id": "727bf142-5683-4192-979f-b1ab551f2dcf",
6632+
"metadata": {},
6633+
"source": [
6634+
"#### Automatic inactivity detection algorithms"
6635+
]
6636+
},
6637+
{
6638+
"cell_type": "markdown",
6639+
"id": "609f8cb3-3eaa-4375-b78e-5a5d1f66e66c",
6640+
"metadata": {},
6641+
"source": [
6642+
"`circStudio` contains several algorithms to detect inactivity periods in actigraphy recordings. In this tutorial, we will illustrate this functionality using the Roenneberg (also known as MASDA) algorithm."
6643+
]
6644+
},
6645+
{
6646+
"cell_type": "code",
6647+
"execution_count": null,
6648+
"id": "3e78ca92-e65f-4af7-b670-06f15f6559b7",
6649+
"metadata": {},
6650+
"outputs": [],
6651+
"source": []
6652+
},
66076653
{
66086654
"cell_type": "code",
66096655
"execution_count": null,
6610-
"id": "18d87e2c-5c14-4709-8192-fc7d3a98f49b",
6656+
"id": "0e2fec8b-8cf2-4f3d-8516-5d7840c87f5d",
66116657
"metadata": {},
66126658
"outputs": [],
66136659
"source": []
66146660
},
66156661
{
66166662
"cell_type": "markdown",
6617-
"id": "36061f50-a197-4671-940f-b4c29e2e2618",
6663+
"id": "5eb1b4c9-4921-4363-aaa3-ee4c80baef8e",
66186664
"metadata": {},
66196665
"source": [
6620-
"### Sleep"
6666+
"#### Sleep Midpoint"
66216667
]
66226668
},
66236669
{

0 commit comments

Comments
 (0)