moved PortData to entity level. Now the average values are calculated by the database and the measurements are only loaded if needed