Transformation of energy of a photon I'm new to the forum so excuse me if I'm doing anything in a wrong format. 
My question is this:
A photon fired from a spaceship at rest has energy $E$, if the spaceship starts moving with speed $v=\beta c$ relative to us (who are at rest outside of the spaceship) and fires the photon while moving what would we see the energy of the photon as? 
The question resembles Einstein velocity addition but it's different in the sense that the speed of the photon in both cases will be $c$, but I expect the energy of the photon to increase. The question is also different than the ones I've found on this site that go something like: If the reference frame were to change etc. In my case the reference frame is the same initially and finally.
Thank you
 A: Consider this nomenclature for simplicity: Photon 1 is the photon emitted by the spaceship when it was at rest with respect to the outside observer and Photon 2 is the photon emitted by the spaceship when it is moving at a uniform speed with respect to the outside observer.
Since the mechanism through which the photon is emitted from the spaceship is not going to change with respect to the spaceship whether the spaceship is moving uniformly with respect to an outside observer or at rest, the energy of the photon 1 and 2 are both equal in the spaceship frame. Let's say that energy is $E$. 
Now if we see the second photon from the outside observer's frame then even if the speed of the photon is still same as compared to its speed in the  spaceship frame its energy changes. The reason is that a photon's energy is not a function of its speed, but it is a function of its frequency ( Particularly, directly proportional to its frequency) and due to the time dilation phenomenon the frequency of the photon 2 is different in the spaceship frame and in the outside observer's frame.
Now, the frequency of photon 2 in spaceship frame and in the outside observer's frame can be related in the following manner:
$f_s\ (1-v/c) / \sqrt{1-v^2/c^2} = f_o$ 
Where $f_s$ is the frequency in spacetime frame and $f_o$ is the frequency in the outside observer's frame. Thus, the energy of photon 2 is also related through the same relation. The energy of the photon in the outside observer's frame will be less than that in spaceship frame by a factor of $\sqrt{1-v^2/c^2}$.
So in Spaceship frame:
$E_1 = E_2 = E$
But in outside observer's frame:
$E'_1 = E$ and $E'_2 = E \ (1-v/c) / \sqrt{1-v^2/c^2}$
So energy of a photon emitted through a mechanism at rest is not same as that emitted through the same mechanism in moving condition (Both observed with respect to the same observer.)
