Shilpi06's Blog

Weekly BLog Post #4

Published: 06/21/2023

What I did this week: 

I had to change the file as the signals generated were not exactly correct. I was advised to follow the multiple gaussian signal generation method. While doing this I had to look closely at several already implemented methods and go in depth to understand how those functions were achieving the desired output. 
The multiple gaussian signal generation method is preferred because the CTI signal generation closely resembles the multiple gaussian signals. We're using the multiple gaussian signals so that we can have a priori of what to expect from the outcome, if we fit our model to this signal.
I also managed to implement the design_matrix for the CTI tensor and managed to save it up in the file. The design matrix is a crucial component of the CTI tensor as it represents the relationships between the different variables in our model. By accurately modeling these relationships, we can generate more realistic simulations and gain a deeper understanding of the CTI tensor.

The link of my work:

What is coming up next week: 

This week I'll work on fitting CTI on multiple Gaussian simulations and see if it produces the expected output. And therefore, work on improving it. This may require implementing a bunch of methods for the Fit class.

View Blog Post

Weekly Blog Post #3

Published: 06/13/2023

What I did this week: 

This week i worked on finishing the simulations with the appropriate documentation. I also worked on creating a general tutorial for cti/ qti as one doesn't already exist for qti. 
The idea behind this general tutorial was that there isn't any tutorial for advanced diffusion encoding.The closest documentation qti has is `here <https: 07_reconstruction="" 1.7.0="""" documentation="" examples_built="" reconst_qti="">`.However, there are several youtube videos. So, in this tutorial we started with simulating qti, and then we make things a little more complex by adding information on cti as qti can only handle a single gtab whereas cti can handle multiple gtabs.
This week I also started by initializing file by adding relevant simulations to it. </https:>

What Is coming up next week: 

I intend on finishing the simulations with appropriate documentation and theory lines. If time permits, I'll resume working on the file and it's tests section.
The work on creating simulations is not entirely complete as it requires conversion of all .py files into rst so that it could be generated by sphinx. I also intend on making the tutorial more complete by maybe adding some more detail to it.
The major thing I intend on working on is the construction of the design_matrix for the cti model. 
In the context of diffusion MRI, a design matrix refers to a matrix that encodes the relationship between the data (diffusion-weighted signals) and the model parameters we want to estimate. It is essentially a way to map the model parameters to the observed data.
The design_matrix in case of cti captures more complex tissue microstructure information than either DTI or DKI or QTI.

Did I get stuck anywhere

No, I didn't get stuck. But implementing btensor value for cti simulation did require a bit of effort.


View Blog Post

week2 Blog - 5thJune

Published: 06/05/2023

What I did this week: 

I worked through this research paper, and found some relevant facts to the tasks at hand, such as the different sources of kurtosis. One other important fact I found out was that, DDE comprises 2 diffusion encoding modules chracterized by differnet q-vectors (q1 and q2 ) and diffusion times. This fact is important because, CTI approach is based on DDE's cumulant expansion, and the signal is expressed in terms of 5 unique second and fourth-order tensors. I also found out about how the synthetic signals could be created using 2 different scenarios, which comprises of a mix of Gaussian components and a mix of Gaussian and/or restricted compartments. 
The major time I spent this week was in creating synthetic signals, and therefore in creating simulations.

What's coming up next week:

I intend on finishing the simulations with appropriate documentation and theory lines. If time permits, I'll resume working on the file and it's tests section.

Did I get stuck: 

I didn't get stuck, however it did take me a while to go through all the code that I could possibly be needing in my simulations, and also in understanding the theory behind those codes.

View Blog Post

Community Bonding & Week1 Insights:

Published: 05/29/2023

About Myself

Hey there! I'm Shilpi, a Computer Science and Engineering undergrad at Dayananda Sagar College of Engineering, Bangalore. I'm on track to grab my degree in 2024. My relationship with Python started just before I started college - got my hands dirty with this awesome Python Specialization course on Coursera. When it comes to what makes me tick, it's all things tech. I mean, new technology always excites me. Ubuntu, with its fancy terminal and all, used to intimidate me at first, but now, I get a thrill out of using it to do even the simplest things. Up until 2nd year I used to do competitive programming and a bit of ML. But from 3rd year I've been into ML very seriously, doing several courses on ML as well solving ML problems on kaggle. ML is very fun and I've done a few project on ML as well. Coding? Absolutely love it. It's like, this is what I was meant to do, y'know? I got introduced to git and GitHub in my first year - was super curious about how the whole version control thing worked. And then, I stumbled upon the world of open source in my second year and made my first contribution to Tardis: (``_) Initially, I intended on doing GSoC during my second year but ended up stepping back for reasons. This time, though, I was fired up to send in a proposal to at least one organization in GSoC. And, well, here we are!

Intro to Open-Source and GSoC

So, I started off finding out about GSoC - how many hours do selected folks put in, the kind of projects people usually tackle, and all that stuff. To get a handle on what they want in a proposal, I turned to some successful ones from previous years. Really gave me an idea of the kind of stuff they expect you to bring to the table. Trying to find the organization that'd go with my skill set, I stumbled upon Python Software Foundation, and I was like, "This is it!". And under PSF, there was DIPY. Diving into DIPY's docs was a breeze as they've got it so well put together that I managed to get my head around a completely new topic, "Diffusion MRI", just by going through their introductory docs and a bit of gpt. While exploring DIPY, I noticed this issue that needed a new feature. It took a good bit of reading to really understand what they were looking for and how to actually build that feature. And then, I submitted my first PR (`check it out here:`_)! Getting it merged wasn't exactly easy - there was a lot of room for improvement up in my code, but honestly, I feel like it's all part of the learning curve. I was a bit of a latecomer to GSoC, so I didn't have much time to make up a ton of PRs. Plus, by the time I'd submitted my first PR, the proposal submission period had already begun. So, I focused all my energy on increasing my knowledge on the topic and polishing my proposal. Plus, I'd wanted to get my proposal reviewed at least once before I submitted it.

Code contributions:

  1. [#2749]

The Day

May 4th: I woke up feeling like a nervous wreck. That interview with my organization? Let's just say it didn't go very well. Yet, I couldn't help but hope for the best. The results were supposed to drop at 11:45pm, a moment I wasn't exactly looking forward to. I tried logging into Google to check, but couldn't. Too many people doing the same thing. I threw my hands up, gave up on the login battle, and got back to work, hoping to distract myself. Fast forward to 1:30am - I figured by now, the log-in rush should have calmed down. I gave it another shot and... I got in! I clicked over to the dashboard, and there it was. My project. Right there, listed under the Projects section. I had heard that if you get selected, your proposal shows up there. To confirm that it was actually happening, I picked my phone to check if I'd gotten any official email yet. And yes!! I'd gotten it at 12:49 am. I just hadn't checked. I whooped, woke up my roomies, rushed to call my parents. Honestly, words can't even begin to capture how I felt at that moment. Pure, undiluted joy, that's what it was. My parents, surprisingly actually picked up my call. But the minute I told them I'd made the cut, they congratulated me. It was heck of a day, (^^).

What I did this week

As this was my first week I majorly spent a lot of time knowing about the codebase of the organization. I also went through a couple of research papers of projects which have already been implemented to get information related to my branch. I'm currently in the middle of reading through the research paper, which is directly related to my project: here I also went through some of the videos related to information on cti, a couple of them are: this and also, this I also submitted this PR. In this PR members of my organization are supposed to submit all the blogs. But mostly I spent a lot of time in implementing the already existing MultiTensor Simulation on my local system , and also completing the assignment which my mentor gave me. In this assignment, I was given a specific number of directions, 'n' and some steps on how to produce bvals and bvecs. I had to create gtab1 and gtab2. and then taking gtab1 & gtab2 as input, I was supposed to create a function which would give output btensor i.e btens. The purpose of this assignment was to strengthen my knowledge on concepts I've already read and also to give me some coding experience, as this is critical in order for me to be able to implement the rest of my project.

What is coming up next Week

These simulations were basically the first task of the proposal. So after the btensor I intend on producing the synthetic signals using the qti model (hint on how it is done in qti tests). make a figure similar to figure 1 of the 2021 CTI paper: here

Did I get stuck anywhere

I got stuck while creating this PR, I had to rebase a bunch of commits and this was a new concept to me so it took me a while to figure it out. And due to rebasing, I ended up creating a bunch of other commits because of which the commit history of this PR was a mess. So I again had to learn about the concept of squashing the commits. I also got stuck a lot while trying to find out the perpendicular directions to the vectors used in gtab1 . I was supposed to implement the formula in .. image:: I had to spend a lot of time figuring out how to combine 3 vectors of shape (81, 3) to get V. And also working on the function which would give me the perpendicular vector to the vector in gtab1. I got a bunch of ValueErrors saying: could not broadcast input array from shape (3,3,1) into shape (3,3) and some IndexError saying: shape mismatch: indexing arrays could not be broadcast together with shapes (81,) (3,1) (3,). I also had to experiment on how to concatenate different vectors to get the vector of right shape, since there are a bunch of possible options while stacking, such as vstack, hstack, stack etc

View Blog Post