A written ruling details why a judge restored funding for many NIH grants.