Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hop calculation issues #715

Open
ID2GO opened this issue Jan 23, 2023 Discussed in #596 · 13 comments
Open

Hop calculation issues #715

ID2GO opened this issue Jan 23, 2023 Discussed in #596 · 13 comments

Comments

@ID2GO
Copy link

ID2GO commented Jan 23, 2023

Discussed in #596

Since my upgrade this weekend from version 2.3 to 3.0.5 I noticed that the IBU calculations are off. The higher it should be, the greater the difference becomes. I'm working on a Blond beer with OG 1.052, addition of 45grams with 4,1 Alpha and an intended IBU of 21 Tinseth. Since the upgrade the IBU is shown as 19.1.
The numbers do not correct after closing & reopening the program.

This problem also shows in other recipes.

Is there a way to check the formula & correct it?

Originally posted by jimdbr May 24, 2021
I am using the latest development version of Brewtarget. I am having issues with hops additions. The calculated IBU is not updated correctly until after I leave the hop tab and return. The numbers are sometimes bogus. A couple of examples:

I added 28g of Cascade pellets for 60 minutes and had 0 IBU.

I added 28g of Eldorado pellets for 10 minutes and had a calculated IBU of approximately 43,000. I love hops but this might be excessive.

I added Galaxy pellets with an alpha of 12 to the database. When I include it in a recipe it comes in as leaf hops instead of pellets.

I don't have the previous version of Brewtarget available so I need to head over to Brewers Friend for today's brew. I will play with Brewtarget later to see if any of this is reproducible.

@matty0ung
Copy link
Contributor

Sorry to hear you're having these problems. Thanks for the detailed bug report.

This could be, at least in part, related to #695. Certainly the pellet showing as leaf sounds like it's caused by or related to that problem (which should get fixed in the forthcoming 3.0.6 release.)

I'll see if I can reproduce the problems you're seeing.

matty0ung added a commit that referenced this issue Jan 23, 2023
Fixes for enum mapping and persistent settings file name
Merging as is hopefully part of the fix for #715
@ID2GO
Copy link
Author

ID2GO commented Jan 23, 2023 via email

@matty0ung
Copy link
Contributor

This should be fixed in the 3.0.6 release. If you still see problems, please don't hesitate either to reopen this ticket or raise a new one.

@ID2GO
Copy link
Author

ID2GO commented Feb 20, 2023 via email

@matty0ung matty0ung reopened this Feb 21, 2023
@matty0ung
Copy link
Contributor

Ah, hmm, interesting. Is it just recipes you edited with the 3.0.5 release or also other ones? Are there any error messages in the log file?

@matty0ung
Copy link
Contributor

I'm wondering if maybe the bug in the 3.0.5 release meant that, after the software "misread" the value of the type field, it wrote the misread value back to the database.

@mikfire
Copy link
Contributor

mikfire commented Feb 21, 2023

When I noticed the problem, that was the first thing I looked at. It didn't. Just reading the DB didn't seem to cause the values to be written back. I have no good guesses as to what would happen if a recipe were updated, but the problem would likely be isolated to just that recipe.

@ID2GO
Copy link
Author

ID2GO commented Feb 22, 2023 via email

@matty0ung
Copy link
Contributor

I'll have a crack at doing the case insensitive matching that @mikfire sensibly suggested a while back. I can't promise it will fix things, but it might help. Hopefully @ID2GO you should find that, even before that fix, no further recipes are getting wrong hop types, and so, worst case, it's just needed to manually fix the recipes you manually edited in 3.0.5 (and any derived from them, as you say).

@ID2GO
Copy link
Author

ID2GO commented Apr 26, 2023 via email

@matty0ung
Copy link
Contributor

Has anyone noticed that when trying to import beerxml data from for instance brew dog that data can not be imported? Is that due to faulty data from Brew Dog or are the beerxml parameters to strict?

Usually the program should try to tell you why it could not import something, but it's true the error messages can be a bit technical. If you attach a problematic XML file here, we'll gladly have a look at it.

@matty0ung
Copy link
Contributor

I downloaded the BeerXML for one of the BrewDog recipes from https://brewdogrecipes.com/recipes/punk-ipa-2007-2010. It's not correct BeerXML, eg it's missing content in the mandatory TYPE field in the STYLE records. (The BeerXML standard says the permitted values for this field are “Lager”, “Ale”, “Mead”, “Wheat”, “Mixed” or “Cider”. The brewdog recipe just has "".)

One of the problems with BeerXML is that the original specification is just a Word document, and there was no machine-parsable schema published for it. We have reverse-engineered a schema for Brewtarget, which gives us a way of validating BeerXML documents before we attempt to read them in (plus some relatively high confidence that the BeerXML we output is valid). But I think a lot of other programs have not gone to such lengths, so there can be a range of interpretations of what's OK.

When we eventually get on to BeerJSON, things will be a lot better as there is an official published schema that everyone is supposed to follow. (The schema has a few flaws, but it's relatively good.)

BeerJSON is taking a while to come, not because the JSON bit is hard but because it's a massively expanded scope compared with BeerXML. There approximately twice as many fields that can be represented in BeerJSON as in BeerXML. We've done most of the hard stuff, but there's still a bit of work to do.

@ID2GO
Copy link
Author

ID2GO commented Jul 18, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants