<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>python | John Thorp</title><link>https://jnthorp.github.io/tag/python/</link><atom:link href="https://jnthorp.github.io/tag/python/index.xml" rel="self" type="application/rss+xml"/><description>python</description><generator>Hugo Blox Builder (https://hugoblox.com)</generator><language>en-us</language><lastBuildDate>Wed, 31 May 2023 00:00:00 +0000</lastBuildDate><image><url>https://jnthorp.github.io/media/icon_hu7032ec0ed3b220067d1822c52f98a335_44239_512x512_fill_lanczos_center_3.png</url><title>python</title><link>https://jnthorp.github.io/tag/python/</link></image><item><title>dopaminergic modulation of replay-mediated memory updating</title><link>https://jnthorp.github.io/project/reconsolidation/</link><pubDate>Wed, 31 May 2023 00:00:00 +0000</pubDate><guid>https://jnthorp.github.io/project/reconsolidation/</guid><description>&lt;p>Our understanding of when and how memories update is a burgeoning area of research. Prior work has shown that partial reminders open up a window in which memories can be modified. Recent neuroimaging work has provided evidence that hippocampal univariate activity after these reminders relates to the extent to which memories are updated. We were interested in whether and how partial reminders facilitate reconsolidation by examining neural processes associated with memory consolidation. To this end, we examined post-reminder memory replay as well as functional connectivity with the dopaminergic ventral tegmental area during rest. Replay was examined locally in the hippocampus as well as across the default-mode network, separated into the medial-prefrontal network, the anterior-lateral network, and the posterior-medial network. We found that the frequency of replay events for interrupted videos was generally significantly enhanced compared to uninterrupted, or full, videos across both the hippocampus and cortical networks. Functional connectivity with the VTA modulated this effect across the cortical networks, and particularly strongly in the posterior-medial network. In this region, resting functional connectivity with the VTA significantly increased the effect of replay on memory updating specifically for the interrupted videos. That is, replay under conditions of low VTA connectivity were better stabilized and left with fewer errors, while replay under conditions of high VTA connectivity were more strongly updated and left with a greater number of errors. To further specify the nature of the errors explored here, a secondary analysis showed a very similar relationship between the proximity with which two stories were replayed and the similarity with which they were subsequently recalled, as measured by semantic embedding vectors. Specifically, that proximal replay within the posterior-medial network under conditions of low VTA connectivity led to semantic differentiation, while proximal replay under conditions of high VTA connectivity led to semantic integration. This work therefore shows, for the first time, that the role of replay in reconsolidation is dependent on dopaminergic signals, long known to signal learning events and induce learning-related plasticity across the cortex.&lt;/p></description></item><item><title>inference guides retroactive effects of arousal on memory</title><link>https://jnthorp.github.io/project/tgif/</link><pubDate>Wed, 31 May 2023 00:00:00 +0000</pubDate><guid>https://jnthorp.github.io/project/tgif/</guid><description>&lt;p>Aversive category conditioning has been shown to retroactively increase recognition of related items through arousal-mediated reactivation. Schemas and incongruent, one-shot associations have also been shown to mediate reactivation, though in separate paradigms and through disparate neural pathways. Here, we design two experiments to test the relationship between the contingency structure of aversive learning and retroactive memory enhancements. Both experiments consist of a preconditioning phase in which participants view items congruent and incongruent with scenes belonging to two separate real-world schemas. Experiment 1 then associates an entire schema with aversive shock, with participants showing improved recognition for previously-encountered congruent, but not incongruent, items. Experiment 2 associates a schema with shock while maintaining one scene as safe, which leads to participants showing improved high-confidence recognition for all previously-encountered items, both congruent and incongruent. Individual differences in how strongly participants generalize shock expectancy ratings across the entire schema – that is, whether they infer the individual scenes or the schema broadly to be the source of the aversion – were then correlated with the memory effects from Experiment 1.&lt;/p></description></item><item><title>representational granularity across the hippocampus</title><link>https://jnthorp.github.io/project/granularity/</link><pubDate>Tue, 31 May 2022 00:00:00 +0000</pubDate><guid>https://jnthorp.github.io/project/granularity/</guid><description>&lt;p>A particularly elusive puzzle concerning the hippocampus is how the structural differences along its long anteroposterior axis might beget meaningful functional differences, particularly in terms of the granularity of information processing. One measure posits to quantify this granularity by calculating the average statistical independence of the BOLD signal across neighboring voxels, or intervoxel similarity (IVS), and has shown the anterior hippocampus to process coarser-grained information than the posterior hippocampus. This measure, however, has yielded opposing results in studies of developmental and healthy aging samples, which also varied in fMRI acquisition parameters and hippocampal parcellation methods. To reconcile these findings, we measured IVS across two separate resting-state fMRI acquisitions and compared the results across many of the most widely used parcellation methods in a large young-adult sample of male and female humans (Acquisition 1, N = 233; Acquisition 2, N = 176). Finding conflicting results across acquisitions and parcellations, we reasoned that a data-driven approach to hippocampal parcellation is necessary. To this end, we implemented a group masked independent components analysis to identify functional subunits of the hippocampus, most notably separating the anterior hippocampus into separate anterior-medial, anterior-lateral, and posteroanterior-lateral components. Measuring IVS across these components revealed a decrease in IVS along the medial-lateral axis of the anterior hippocampus but an increase from anterior to posterior. We conclude that intervoxel similarity is deeply affected by parcellation and that grounding one&amp;rsquo;s parcellation in a functionally informed approach might allow for a more complex and reliable characterization of the hippocampus.&lt;/p></description></item><item><title>python package to reconnect muse headset</title><link>https://jnthorp.github.io/project/muse/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://jnthorp.github.io/project/muse/</guid><description>&lt;p>Seems to be an issue endemic to the use of Muse headsets that the headsets will randomly llose connection with the laptop. This is particularly bad whenever multiple headsets are connected to multiple laptops within tight proximity. Because of this, our classroom study of multiple students wearing headsets being observed by one RA during a real lecture was nearly impossible to conduct.&lt;/p>
&lt;p>To solve this, I adapted the popular muse-lsl package to monitor the connection with the headset and, in the event of a disconnect, safely end all the existing processes and set them up again. This sounded relatively trivial when I started, but a number of requirements and oddities pushed it towards non-triviality.&lt;/p>
&lt;p>Firstly, muse-lsl requires a new terminal for every stream of data (EEG, ACC, GYRO, PPG). There might be a way to open all the ports necessary from one terminal, but I never figured it out. This brought about the necessity of opening up a number of terminals that could be monitored and quit in a controlled manner. On a Windows machine, this required a wrapper function that mimics the standard subprocess.Popen syntax but opens a socket, receives the subprocess cmd, then waits for the termination request.&lt;/p></description></item></channel></rss>