Converting from .npy to .ill results format

Hi forum,

Do any methods exist for converting the new .npy outputs from annual daylight to the old .ill format?

We’ve got some in house workflows that were built around the .ill and .pts outputs from the old version that we’re trying to use - wondering what the simplest workaround is and if any methods already exist that we could use.

Alternatively, is there another way to run the annual daylight analysis to give the old output? Maybe running an older version of the component of the old code still exists?

Last thing - do you think that this current format will change in the long term.

@mikkel would you mind having a look at this?
Would be great if there’s an existing easy win we could take advantage of.

Many thanks,
Charlie

Hi.

I seem to remember that there is some code for handling the numpy arrays in the annualtodata component.

Perhaps a good starting point.

Hi @charlie.brooker,

Back when we made the change, I thought about adding a command to convert to the old results folder format so I could easily debug or compare, but I never really needed it. I can add a CLI command to convert the entire folder to the old format.

You would have to replace the recipe with the older version in this folder:
C:\Program Files\ladybug_tools\python\Lib\site-packages\lbt_recipes\annual_daylight

Probably not in the near future, but I will not rule it out completely if something better comes up.

If you do not mind feeling like you are wasting your time you can convert each file manually :clown_face:
There is an existing CLI command for just a single file:
honeybee-radiance-postprocess translate npy-to-txt

But I can add the command to convert the entire folder on Monday.

4 Likes

Thanks @mikkel, really appreciate the response.

I don’t want to trouble you into adding methods for such a niche use case.

Great to know the option is there to change the recipe file if we need to, and happy to manually convert file by file for this case.

Makes sense not to limit any future changes to the results format.

Leading from what you’re saying @LittleBuddha, there’s always going to be methods to access the full results data and it makes sense for us to adjust our workflows to start from taking the output annual data - there will always be LBT methods to convert however the results are stored to data.

Hi @charlie.brooker,

With the latest version of honeybee-radiance-postprocess you can use the CLI command,
honeybee-radiance-postprocess translate annual-daylight-npy-to-ill

Add --help to the end of the command to get the help message. If you did not rename the results folder you can run it as honeybee-radiance-postprocess translate annual-daylight-npy-to-ill results.

If you want to use it in Grasshopper you can wrap it in a custom component. See for example HB Annual Daylight Metrics for how to call commands from honeybee-radiance-postprocess.

3 Likes

Hello @mikkel! Thank you for the solution.
On a related note, the HB Annual Results to Data component would still like to read illuminance results. I’m using this extensively in my workflow and was relying on .ill files until now - is this expected to change too?

Hi @pragchow ,

The latest “Annual Results to Data” component accepts both results in numpy format as well as the older .ill format. So just make sure you are using the component from 1.6.0 and you should be ok.

Yes indeed, it was just the version. Thank you @chris!

1 Like