I was trying to use the grid_filters for post processing of annual results to get results by room name which I had set up when creating the daylight models.
I came across a case where 2 room names were similar 'Studio and ‘LStudio’. When I used the filter ‘Studio’ it was also giving me the results for the ‘LStudio’. I know an easy fix would be to make sure the room names don’t contain any of the other room names, however this was already after annual daylight simulations on 400+ rooms, so it wasn’t feasible to go back and alter the room naming convention.
I had a look in the code in C:…ladybug_tools\python\Lib\site-packages\honeybee_radiance\writer.py and changed the code on line 819 from:
if re.search(pattern, id_):
if re.match(pattern, id_):
after doing a bit of reading on re — Regular expression operations — Python 3.10.6 documentation
This has solved my problem, but I’m not very familiar with regular expression matching so would welcome your opinion on this case.