Mass constraint for a planet in a protoplanetary disk from the gap width