Skip to content

Commit

Permalink
添加新的页面
Browse files Browse the repository at this point in the history
  • Loading branch information
Ginsakura committed Oct 17, 2024
1 parent dd9f2f0 commit f886b43
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ SavAnalyze.json
*.pyd
*.pyproj*
*.sav
*.split
*.sfp
*.sln
*.spec
Expand Down
39 changes: 39 additions & 0 deletions AllHitAnalyze.New.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import json
import numpy
import matplotlib.gridspec as gridspec
import matplotlib.patches as patches
import matplotlib.pyplot as plt
#import matplotlib.widgets as widgets
import sqlite3 as sql

from matplotlib.pyplot import MultipleLocator
from matplotlib.widgets import Button, Slider

class AllHitAnalyze(object):
def __init__(self) -> None:
super(AllHitAnalyze,self).__init__();
# sql init and select data
db:sql.Connection = sql.connect("./musync_data/HitDelayHistory_v2.db");
cur:sql.Cursor = db.cursor();
sqlData:list = cur.execute("SELECT HitMap FROM HitDelayHistory").fetchall();
# init hit map: [-149, -0], [+0, +250]
self.hitMapPositive:list[int] = [0]*150;
self.hitMapNegative:list[int] = [0]*251;
# init PDF(Probability Density Function)
self.summation:int = 0; # All Hit
self.summationEx:int = 0; # Blue Exact & Cyan Exact
self.summationEX:int = 0; # Only Cyan Exact
# summation SYNC.Rate: [Cyan Exact, Blue Exact, Great, Right, Miss]
# self.SYNC_Rate:list[int] = [0] * 5;
# summation Accurate SYNC.Rate:
# [¡À5ms, ¡À10ms, ¡À20ms, ¡À45ms, Blue Exact, Great, Right, Miss]
self.Accurate_Sync_Rate:list[int] = [0]*8;
self.LoadHitMap();

# init chart axis
self.xAxis:list[int] = [i for i in range(-150,251,1)];
self.yAxis:list[int] = self.hitMapPositive + self.hitMapNegative;


def LoadHitMap(self) -> None:
pass

0 comments on commit f886b43

Please sign in to comment.