Detecting Earth from distant stars