 is EG, it's synthetic EG and we'll be using FastLogic to try and find, detect this EMG embedded in it. To know why does this funny thing of scaling the waveform up and down would expect it just to be the same amplitude throughout. Let's actually start with that quickly. So put it in our window, we have essentially four windows, we have a code, the code is split into two windows, it's a Visual Studio code, but it has the GitHub co-pilot sheet open because that's what we use and it obviously has the code. We're mainly doing a HTML JavaScript, Python and CSS or styling the membership functions. Right, so we actually have the HTML which shows the front panel, has some description at the bottom, but we'll have to correct it after making the more recent changes. Yeah, to know what's up with this, so we have this color scheme that we're using for the project. These colors here, they're from some festival in South America. So let's jump into it. So looking at the code above, I would like some suggestions, maybe do not generate the code yourself, but generate prompts that I can use with GitHub co-pilot because it will have the more updated version of the script. Now looking at the code above that I shared, can you check a few things? First of all, when I scroll through the data, it's scaling the signal, zooming out and when I stop scrolling it, adjusting the amplitude, this is pretty annoying. How can we fix that? See just warming up with something simple. It's not going to time me out, is it? Here are some prompts you could use with GitHub co-pilot to get suggestions for modifying your JavaScript code. Right, so we have a bunch of them, I don't know why. We don't want additional functions, no. I'm encountering an issue with amplitude adjustment in my EEG chart. Currently, when I stop scrolling through the EEG data, the chart adjusts the amplitude automatically, which is not desirable. I need the amplitude to remain constant and not readjust after scrolling. Could you help me adjust my JavaScript chart update function to maintain a fixed amplitude range regardless of the scroll position? Okay, everyone sounds legit. Let's try it out. Ampitude adjustment is happening because of these lines. Max data point constant, the scales. So when max data point is being calculated, the multiple will fetch the entire EEG data. So where would that be? Here, clearing an alpha to y, but okay. Well, this is the same. Is it the same? Don't need this scale to fetch that constant fetch data if array. Okay, we just need to do, so we don't need this anymore, do we? I can just keep doing it on a different variable, substituting display g. It's still down to control of five. It's only happening during scrolling. Okay, we'll leave it for now. The other main thing is we want to display those membership functions, membership functions. Actually, we would like to do as much as possible within the JavaScript, so I don't even know why we need so much of a Python code. Okay, moving on, the membership functions are currently not being displayed properly. It's just displaying one value and the current amplitude, current frequency, and current artifact risk are said to be not available. We need to fix that. Now question, another question is can we do most of the processing within JavaScript and use back-end as little as possible? What is this fuzzy control for a fuzzy control? What? It doesn't sound like it's going to work. What about this one or that one? I think I actually have to use the second one. I don't remember yet. Did something similar before? Oh, yeah, let's just save that file. Still haven't fixed a GitHub, a co-pilot, a GitHub, no, the GitHub, the Git. So it's still fetching from the back-end, which is not ideal. Let's file always be the same. Just check something. Here, it requires not to use a port statement. It's dead. It's not defined. All right, so we have a fuzzy controller just making this up or it actually exists. Link, what? Is there a fuzzy controller JS? I think this is referring, so the fuzzy controller here referring to my Python. I'm really confused. Get rid of it for now. Yeah, there's too much stuff happening on the back-end, I think. Minimize back-end, I want to shift most of the data processing to the client side. Client side, do I have to select the whole JavaScript or it's selecting automatically 1 to 17. It's selecting code around this segment. Normalize that, keeps normalizing that. Yeah, I didn't get that bit. So we're moving the membership functions to JavaScript, which is good. It just made this up. It's suggesting it again, though. This is despite code. What? Oh, I'm super confused right now. So we're asking to shift most of the data processing to the client side, to reduce back-end load, to implement shift normalization. You can normalize data, basic JavaScript operations. Okay, so we have normalize data, already doing something similar. Display analyzing display. Yeah, this is only mainly displaying stuff. Now we're doing some processing as well. There's a lot of debugging. So fetching that and normalizing that, calculating average amplitude, okay. Yeah, so these things don't actually work. This stuff needs to go into the HTML, is it? Yeah, it's important quickly, but it won't work. So using this function in the process, please note that the approach will increase the load on the client's device. That's okay. The other thing is it doesn't actually work and turn it into a module. Yeah, I don't have those. I need a module bundler. Okay, that would not work at the moment, as it is turning mages into a module. It isn't a static folder. Yeah, now this will not work. So every function that requires an import, have to be commented out. Right, so we are working, working again. Like to keep things intact, instead of breaking them. Yes, we need to update the current values. Yeah, we don't need a new JavaScript function. Don't need to refer to GitHub, Copa, there's GitHub, Copa, it's updated the current amplitude, current frequency in the car, right now alpha text on my web page every time you need to tell it's fetched, the values are currently showing. Let's try that quickly. So you have a HTML elements with IDs. I need to check those IDs. Right, it's correct. I don't have those. Yes, we do need this function, call this function, current after current values. I can place it here for a sec, comment that out quickly. Okay, now the values are updating. Okay, can remove that. That's working pretty well so far. So good. We haven't have a prompt chart for playing memory, memory function is only showing one value instead of the full range. Sounds like it might be with the parsing of the data received from the server. It looks like perfect prompt, I couldn't have written anything better myself. It might be how we are mapping the data onto the chart, the plot membership function, you're mapping data to labels. It seems like you're treating data as an array. Yeah, no, this is an array. Okay, can we check plot membership functions? It's not the actual function. Here's the function const labels. Yeah, we'd like to console log the data. We already have the data. But let's do it again. Membership data. What crazy, it's all this nested stuff. Why? Yeah, we're just doing the plot membership function. I'm going to show what I'm meant to be selecting when prompting copper. Let's not stretch the data. We have an object with three properties amplitude, alpha, three scan frequency, each of which is an array of object, each of this object has a name property and points property, where points is an array of arrays. I don't like array of arrays, but okay, let me start the tables. I'm sure you would need to iterate over the array objects and then over the points. So plot data canvas, cdx, after destroy, it's coming that out for a second, doesn't work anyway. Destroy is the same. Then just take the whole, this is const plot data, 8228. No, actually, the problem is elsewhere now. Let's do that prompt for the whole code, because it seems like when we change this function, we have to change something else as well. There are messages, it's just that the dataset points is undefined. Okay, replacing, let's fill that out quickly, place that, looks to be the same anyway, can get rid of it, console. Okay, I might have to continue this next time. See you later. Bye.