Closed EnricoBaivo closed 1 year ago
I don't really understand what any of your output means, checked some of your map ids and I got very accurate values.
What are you comparing rosu-pp's values with?
Sorry, for the bad description.
I will get into detail now, i would also bet on it that i do something wrong.
Im comparing with achieved BEST USER SCORES so i am aware that the pp are slightly under the expected "full pp".
I tryed to reconstruct the score pp value with respektet weighting. So i checked for big pp diffrences from the calculations.
def main():
# fresh fetch from OSU API For User
with open(file="score_calculated_pps.json", mode="r", encoding="utf-8") as f:
scores = json.load(f)
# calculate_pp(scores)
for score in scores:
test_calculate_pp(score)
def test_calculate_pp(score):
beatmaps = Path(os.getcwd()+"/../OsuHub-DATA/%s" %
str(score.get("beatmapset").get("id"))).glob("*.osu")
print("Beatmapset ID: %s" % (score.get("beatmapset").get("id")))
for osu_file_path in beatmaps:
# find beatmap via checksum
md5 = generate_md5(osu_file_path)
bmap = Beatmap(path=osu_file_path.as_posix())
calculator = Calculator(n300=score.get("statistics").get("count_300"),
n100=score.get("statistics").get("count_100"),
n50=score.get("statistics").get("count_50"),
n_misses=score.get(
"statistics").get("count_miss"),
n_geki=score.get("statistics").get(
"count_geki"),
n_katu=score.get("statistics").get(
"count_katu"),
mods=models.mods.Mods(score.get("mods")).bitwise)
res = calculator.performance(bmap)
score_pp = score.get("pp")
if md5 == score.get("beatmap").get("checksum"):
diffrence = round(res.pp-score_pp , 2)
if check_if_pp_is_in_range(reached_pp=score_pp, nearest_expected_pp=res.pp):
# if is in range between 0.8 and 1.1 of the pp
if diffrence == 0.0:
print("MATCHING | Rosu PP: %s Score PP: %s diffrence %s" %
(res.pp, score_pp, diffrence))
else:
print("NOT MATCHING | Rosu PP: %s Score PP: %s diffrence %s" %
(res.pp, score_pp, diffrence))
RESULT: Beatmapset ID: 399061 MATCHING | Rosu PP: 69.63567769262768 Score PP: 69.6353 diffrence 0.0 Beatmapset ID: 770306 NOT MATCHING | Rosu PP: 94.30856476996237 Score PP: 69.4847 diffrence 24.82 Beatmapset ID: 358451 Beatmapset ID: 1280506 MATCHING | Rosu PP: 68.30147624582666 Score PP: 68.3012 diffrence 0.0 Beatmapset ID: 1525595 ....
I first encountered this problem when I calculated each beatmap for a lot of mods and accuracies. Some results were accurate, and some were not. I have to mention that I use a for loop with a multiprocessing approach for calculating each beatmap in a beatmapset concurrently. Each process gets its own Calculator().
bmap = Beatmap(path=osu_file_path)
calc = Calculator()
for mod_flag in mod_combinations:
calc.set_mods(mod_flag)
SS = calc.performance(bmap)
calc.set_difficulty(SS.difficulty)
for acc in all_percents:
calc.set_acc(acc_percent)
performance_attributes = calc.performance(bmap)
Result: WOW_PP.csv MATCHING BEATMAP: checksum "24eac3ecc5a97d3bcbcf32ecf84b14bf" https://osu.ppy.sh/scores/osu/4300840266 ROSU_PP ac:97 1128.927550598182pp Mrekk ac:97,89% 521pp
I would be happy if you could point me out the problem or if it is indeed a bug with rosu-pp-python. Thanks for youre time before hand..
calculator = Calculator(n300=score.get("statistics").get("count_300"), n100=score.get("statistics").get("count_100"), n50=score.get("statistics").get("count_50"), n_misses=score.get( "statistics").get("count_miss"), n_geki=score.get("statistics").get( "count_geki"), n_katu=score.get("statistics").get( "count_katu"), mods=models.mods.Mods(score.get("mods")).bitwise)
Looks like you forgot to specify the combo.
Other than that I can't spot anything wrong so maybe that will fix it already.
Okay, MaxOhn it was my mistake. Thank you for your time.
Tested some calculations and i guess they are not working right or i would expect a diffrence arount 5 to 9 pp but above seems unrealsitic ?
Here are the tested Maps and results: