An analytical function for absorption correction