GSOC Weekly diary - Phase -1
-------------------GSoC weekly diary--------------------------
WEEK-1
After the kick-off call , I started implementing the space-time widget , which was the first task , I created a branch , and started writing code for spacetime widget class , I had already prepared a mock-up for the proposal , so I pretty much had the idea what I had to do , I just had to code it , so I created a scene using pythreejs library , it was really exciting to me , how could set different properties for my scene , lights , and camera , next I had to show the graphs , I used 3d box geometry for that , I displayed the graph as a texture mounted on that box , which is together called mesh , i created a function which would take the connectivity data and preprocess it according to me , and then passes it , where it could be used to create function , this part was actually exciting for me , I got learn new things , I must admit that chatgpt has been really really useful for me , I use it as an assistant , whenever I face a doubt ,I first go to chatgpt , then I search it on the net .the challenges I faced were - during seting up the project in editable mode , i got stuck , turned out I had to just restart the kernel every time I make changes to the package and wanted to test it , during making the grid lines , i experimented a lot , and finally got good grid lines , but i enjoyed that process , other than that everything was pretty much smooth in the first week . I used chatgpt in one way which was really fun for me - I had to make the graphs in tvb's color_theme but for that i had to manually set all the colors and make a color theme , but what i did was - i took a screenshot and told chatgpt to give me the color codes for the color , it gave me all the color , i was really "wow-ed" by this , other than that , in coding or general questions , chatgpt or bing copilot helped a lot . by the end of first week however i was in confusion , that it was not really necsssary to show the graphs in 3d , they could have just been displayed nicely in 2d , it would have been less complicated and neat . So i asked this to my mentor , she agreed , she told that pythreejs may have speed issues , so we both agreed to display both 2d and 3d view as different tabs , but i feel like i should have asked this to her a little bit earlier . but nonetheless , it became alright , i updated my weekly progress on jira . and made a pull request .
---------------------------------------------------------------
WEEK-2
As suggested by mentor, I began working on the 2d graphs, I struggled in this - I tried a lot to display the graphs in a nice grid , but the distance between the graphs was just too much, so then i decided to use matplotlib's gridspec , it solved the issue because i could manually set the distance between the rows and the columns using hspace and wspace. Also I was confused what should i do first , I had three goals already in mind for this week , so simultaneously i was also working on how do i pick the slices, I knew I had to use pythreejs picker class for that, but I struggled in implementing that, I looked at threejs docs, different blogs , and honestly I was so fascinated by all the examples given over there in threejs docs , I feel like going deeper in threejs , but i am not doing that in the moment, but i was confused , and finally I searched on GitHub for similar code, and from there I got the idea, so this thing that i learned is "SEARCH ON GITHUB" - it really really helped me , the kind of thing I want to implement or the kind of project i am working on, or the kind of problem i am stuck on, i look at the projects which are similar to get an idea, how did they tackled this?? and this has helped me a lot. I looked at some project which was using Picker class to pick objects and then got idea on how to do that. But in between that, I decided on implementing some options for time range and conduction speed as i thought it would be a smaller task, I added the buttons , it was pretty much smooth, but then I got into another problem , the changes were taking place too slowly after selecting the options, I knew it was because of the grid.
Because, to display the grid, i was scaling the data the five times, so that the thickness of grid lines is 1/5th. But it was causing the 5 times more calculation and hence 5x times. I tried a lot if I could map two textures to my slice , one for the grid lines and another for the graph , but I could not find how to that . I had to separate the grid from the graph texture so that the grid texture is only calculate once and not everytime an option's value is changed . I brainstormed a lot, so in the end what worked was , I displayed two objects on the same place, making one's texture transparent with a grid and another's had the graph, it worked pretty well, when i changed the options only the texture of the graph object would change. that increased its speed a lot but the tradeoff was that in the matplotlib graphs there was no grid, because the grid texture was now separated from the original data , it did look more clean with grid but it was making it much much slower. Finally I implemented the picking, i had to brainstorm a lot even there, finally I got really smooth way of knowing what object has been picked. It was done, but at one point I was even thinking of using a raycaster , it was good knowing about new concepts , I watched couple of videos on raycaster, but i didn't needed it eventually , okay yet another problem was how do i display the slice in a good way, I was just experimenting with its position but i had to struggle a lot to find a right rotation and scale and brightness for its display. yet another problem - when i picked the slice only the graph object was being picked, the grid was still at its original position, so to solve this problem , after lots of experimenting , i got an idea that the grid object will only be there when the slice will be in its display mode and not always , other time i will just turn off its visibility ,its position will align that of the display mode it further reduced the time of calculation. and finally this way i almost completed the first task of my project - implementing a spacetime widget. just have to write tests now :) this week was really adventurous , I enjoyed a lot, the whole approach was basically experimenting a lot till getting desired result.I had to make tradeoffs too between speed and looks, and I learnt many new things , but I am really happy .
----------------------------------------------------------------
WEEK-3
This week I was not that focussed, I did not felt good about the work that I did , I wrote tests for the spacetime widget, I was really confused I wanted to ask things to my mentor but could not, I feel like I am not doing well with the communications. And there were little issues with the spacetime widget. I have to solve them now. Also this week I felt like whether I am using AI the right way or not? I don't really like asking everything to ai and copy-pasting code.
---------------------------------------------------------
WEEK -4
So this week I started off with fixing all the things that my mentor asked me to fix , like removing unused import, fixing hardcoded values, then increasing text area , fixing some tests , then i had to make two features an option for showing the picked slice and an option for plot details , i started working on those but before that i had an issue so I had a meeting with my mentor in between the week , we discussed things , and come up with additional things to implement. I had some doubt about strange behaviour of the widget I asked that doubt to my mentor , After that I had like completed my widget and said to my mentor , then I began moving on the second widget, I started making the widget, its a bit 3 features are implemented in that widget till now. I kinda feel that this has been a loooooong week.
Now I will be working more at the second widget.
-----------------------------------------------------------------------
Comments
Post a Comment