<｜begin▁of▁sentence｜>### Instruction:
Imagine an astronomer seeking to align two sets of spatial coordinates: matrix X, representing the positions of certain celestial objects observed at one time, and matrix Y, matching those same objects observed at another instance. They are aiming to determine the rotation or reflection necessary to move from the configuration in X to that in Y as precisely as possible. 

The astronomer is interested in an astronomical analogy—much like finding the rotation of one star map to coincide with another—by figuring out an orthogonal transformation matrix using the cosmos of mathematical tools provided by graspologic. Specifically, they wish to engage with the 'OrthogonalProcrustes' method in graspologic to compute this celestial choreography. 

How might this star mapper employ 'OrthogonalProcrustes' to compute the matrix that will rotate and fit the first observation (X) onto the second (Y) with the least stellar distortion, and then apply this cosmic rotation to the original star map (X)?
### Response:
import numpy as np
from graspologic.align import OrthogonalProcrustes

# Sample datasets with shapes (n, d)
X = np.array([[1, 0], [0, 1]])
Y = np.array([[0, 1], [-1, 0]])

# Instantiate the OrthogonalProcrustes object
op = OrthogonalProcrustes()

# Fit the model to find the optimal orthogonal transformation matrix
op.fit(X, Y)

# Apply the transformation to X
X_prime = op.transform(X)

# X_prime is now aligned with Y
print('Transformed X:\n', X_prime)
print('Orthogonal matrix Q:\n', op.Q_array_)
print('Objective function value (lower is better):', op.score_)
<|EOT|>
